throws typemaps for std::wstring using C# patch #1799064 from David Piepgrass
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9956 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3efe579453
commit
23f8a0464c
3 changed files with 25 additions and 4 deletions
|
|
@ -87,6 +87,13 @@ class wstring;
|
|||
return $jnicall;
|
||||
}
|
||||
|
||||
//%typemap(typecheck) wstring = wchar_t *;
|
||||
|
||||
%typemap(throws) wstring
|
||||
%{ std::string message($1.begin(), $1.end());
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, message.c_str());
|
||||
return $null; %}
|
||||
|
||||
// const wstring &
|
||||
%typemap(jni) const wstring & "jstring"
|
||||
%typemap(jtype) const wstring & "String"
|
||||
|
|
@ -157,5 +164,12 @@ class wstring;
|
|||
return $jnicall;
|
||||
}
|
||||
|
||||
//%typemap(typecheck) const wstring & = wchar_t *;
|
||||
|
||||
%typemap(throws) const wstring &
|
||||
%{ std::string message($1.begin(), $1.end());
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, message.c_str());
|
||||
return $null; %}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue