Skip to content

Commit

Permalink
wchar_t* -> IntPtr (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
lithiumtoast authored Jan 28, 2025
1 parent 4846e9e commit c98a637
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cs/production/c2cs.Tool/GenerateCSharpCode/NameMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ public NameMapper(CodeGeneratorContext context)
_cSharpNamesByCNames[source] = target;
}

// wchar_t* support currently limited
_ = _cSharpNamesByCNames.TryAdd("wchar_t*", "IntPtr");

// C types -> C# Interop.Runtime types
_ = _cSharpNamesByCNames.TryAdd("char*", "CString");
_ = _cSharpNamesByCNames.TryAdd("wchar_t*", "CStringWide");
_ = _cSharpNamesByCNames.TryAdd("char", "CChar");
_ = _cSharpNamesByCNames.TryAdd("bool", "CBool");
_ = _cSharpNamesByCNames.TryAdd("_Bool", "CBool");
Expand Down

0 comments on commit c98a637

Please sign in to comment.