fix undesirable wstring encoding at return value marshalling for C#
This commit is contained in:
parent
a9a7b03ba6
commit
8f6d97ab8c
2 changed files with 5 additions and 1 deletions
|
|
@ -23,7 +23,10 @@ class wstring;
|
|||
|
||||
// wstring
|
||||
%typemap(ctype, out="void *") wstring "wchar_t *"
|
||||
%typemap(imtype, inattributes="[global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]") wstring "string"
|
||||
%typemap(imtype,
|
||||
inattributes="[global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]",
|
||||
outattributes="[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]"
|
||||
) wstring "string"
|
||||
%typemap(cstype) wstring "string"
|
||||
%typemap(csdirectorin) wstring "$iminput"
|
||||
%typemap(csdirectorout) wstring "$cscall"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ static SWIG_CSharpWStringHelperCallback SWIG_csharp_wstring_callback = NULL;
|
|||
%pragma(csharp) imclasscode=%{
|
||||
protected class SWIGWStringHelper {
|
||||
|
||||
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]
|
||||
public delegate string SWIGWStringDelegate(global::System.IntPtr message);
|
||||
static SWIGWStringDelegate wstringDelegate = new SWIGWStringDelegate(CreateWString);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue