From 237b344f67e14c4fc81d64ea355789d8b1b9b91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joa=CC=83o=20Matos?= Date: Sun, 5 Apr 2020 17:22:15 +0100 Subject: [PATCH] Change standard type maps to be more specific about its supported generators. --- src/Generator/Types/Std/Stdlib.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Generator/Types/Std/Stdlib.cs b/src/Generator/Types/Std/Stdlib.cs index d3acad7f..3cf97123 100644 --- a/src/Generator/Types/Std/Stdlib.cs +++ b/src/Generator/Types/Std/Stdlib.cs @@ -91,7 +91,8 @@ namespace CppSharp.Types.Std } } - [TypeMap("const char*")] + [TypeMap("const char*", GeneratorKind = GeneratorKind.CSharp)] + [TypeMap("const char*", GeneratorKind = GeneratorKind.CLI)] public class ConstCharPointer : TypeMap { public override Type CLISignatureType(TypePrinterContext ctx) @@ -293,22 +294,26 @@ namespace CppSharp.Types.Std } } - [TypeMap("const char[]")] + [TypeMap("const char[]", GeneratorKind = GeneratorKind.CSharp)] + [TypeMap("const char[]", GeneratorKind = GeneratorKind.CLI)] public class ConstCharArray : ConstCharPointer { } - [TypeMap("const wchar_t*")] + [TypeMap("const wchar_t*", GeneratorKind = GeneratorKind.CSharp)] + [TypeMap("const wchar_t*", GeneratorKind = GeneratorKind.CLI)] public class ConstWCharTPointer : ConstCharPointer { } - [TypeMap("const char16_t*")] + [TypeMap("const char16_t*", GeneratorKind = GeneratorKind.CSharp)] + [TypeMap("const char16_t*", GeneratorKind = GeneratorKind.CLI)] public class ConstChar16TPointer : ConstCharPointer { } - [TypeMap("basic_string, allocator>")] + [TypeMap("basic_string, allocator>", GeneratorKind = GeneratorKind.CSharp)] + [TypeMap("basic_string, allocator>", GeneratorKind = GeneratorKind.CLI)] public class String : TypeMap { public override Type CLISignatureType(TypePrinterContext ctx)