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
|
|
@ -57,8 +57,8 @@ class wstring;
|
|||
%typemap(typecheck) wstring = wchar_t *;
|
||||
|
||||
%typemap(throws, canthrow=1) wstring
|
||||
%{ (void)$1;
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "wstring exception");
|
||||
%{ std::string message($1.begin(), $1.end());
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, message.c_str());
|
||||
return $null; %}
|
||||
|
||||
// const wstring &
|
||||
|
|
@ -109,8 +109,8 @@ class wstring;
|
|||
%typemap(typecheck) const wstring & = wchar_t *;
|
||||
|
||||
%typemap(throws, canthrow=1) const wstring &
|
||||
%{ (void)$1;
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "wstring exception");
|
||||
%{ std::string message($1.begin(), $1.end());
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, message.c_str());
|
||||
return $null; %}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue