Skip to content

Commit 237b344

Browse files
committed
Change standard type maps to be more specific about its supported generators.
1 parent 32b83a3 commit 237b344

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/Generator/Types/Std/Stdlib.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ public override Type CSharpSignatureType(TypePrinterContext ctx)
9191
}
9292
}
9393

94-
[TypeMap("const char*")]
94+
[TypeMap("const char*", GeneratorKind = GeneratorKind.CSharp)]
95+
[TypeMap("const char*", GeneratorKind = GeneratorKind.CLI)]
9596
public class ConstCharPointer : TypeMap
9697
{
9798
public override Type CLISignatureType(TypePrinterContext ctx)
@@ -293,22 +294,26 @@ private static string GetTypeForCodePoint(string encoding)
293294
}
294295
}
295296

296-
[TypeMap("const char[]")]
297+
[TypeMap("const char[]", GeneratorKind = GeneratorKind.CSharp)]
298+
[TypeMap("const char[]", GeneratorKind = GeneratorKind.CLI)]
297299
public class ConstCharArray : ConstCharPointer
298300
{
299301
}
300302

301-
[TypeMap("const wchar_t*")]
303+
[TypeMap("const wchar_t*", GeneratorKind = GeneratorKind.CSharp)]
304+
[TypeMap("const wchar_t*", GeneratorKind = GeneratorKind.CLI)]
302305
public class ConstWCharTPointer : ConstCharPointer
303306
{
304307
}
305308

306-
[TypeMap("const char16_t*")]
309+
[TypeMap("const char16_t*", GeneratorKind = GeneratorKind.CSharp)]
310+
[TypeMap("const char16_t*", GeneratorKind = GeneratorKind.CLI)]
307311
public class ConstChar16TPointer : ConstCharPointer
308312
{
309313
}
310314

311-
[TypeMap("basic_string<char, char_traits<char>, allocator<char>>")]
315+
[TypeMap("basic_string<char, char_traits<char>, allocator<char>>", GeneratorKind = GeneratorKind.CSharp)]
316+
[TypeMap("basic_string<char, char_traits<char>, allocator<char>>", GeneratorKind = GeneratorKind.CLI)]
312317
public class String : TypeMap
313318
{
314319
public override Type CLISignatureType(TypePrinterContext ctx)

0 commit comments

Comments
 (0)