From cd0a8199ad0352340537bade6e0307c00e30e471 Mon Sep 17 00:00:00 2001 From: Anton Masnyi Date: Fri, 25 Oct 2024 14:28:37 +0300 Subject: [PATCH 1/2] Fix: Replace wchar with wchar_t for standardization and compatibility --- src/CppAst/CppPrimitiveType.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CppAst/CppPrimitiveType.cs b/src/CppAst/CppPrimitiveType.cs index 6479765..ab032c7 100644 --- a/src/CppAst/CppPrimitiveType.cs +++ b/src/CppAst/CppPrimitiveType.cs @@ -171,7 +171,7 @@ public override string ToString() case CppPrimitiveKind.Void: return "void"; case CppPrimitiveKind.WChar: - return "wchar"; + return "wchar_t"; case CppPrimitiveKind.Char: return "char"; case CppPrimitiveKind.Short: From 4632ef02b5a6cd86de51cb86107d329401cba987 Mon Sep 17 00:00:00 2001 From: Anton Masnyi Date: Sat, 26 Oct 2024 06:39:21 +0300 Subject: [PATCH 2/2] Tests fixed. --- src/CppAst.Tests/TestTypeAliases.cs | 2 +- src/CppAst.Tests/TestTypedefs.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CppAst.Tests/TestTypeAliases.cs b/src/CppAst.Tests/TestTypeAliases.cs index 893ae80..36d8aef 100644 --- a/src/CppAst.Tests/TestTypeAliases.cs +++ b/src/CppAst.Tests/TestTypeAliases.cs @@ -12,7 +12,7 @@ public void TestSimple() using Type_bool = bool; -using Type_wchar = wchar_t ; +using Type_wchar_t = wchar_t ; using Type_char = char; using Type_unsigned_char = unsigned char; diff --git a/src/CppAst.Tests/TestTypedefs.cs b/src/CppAst.Tests/TestTypedefs.cs index 30e54c4..37c7a9e 100644 --- a/src/CppAst.Tests/TestTypedefs.cs +++ b/src/CppAst.Tests/TestTypedefs.cs @@ -12,7 +12,7 @@ public void TestSimple() typedef bool Type_bool; -typedef wchar_t Type_wchar; +typedef wchar_t Type_wchar_t; typedef char Type_char; typedef unsigned char Type_unsigned_char;