throws typemaps added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6054 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a1165fe106
commit
d6f5100b73
1 changed files with 10 additions and 0 deletions
|
|
@ -57,6 +57,11 @@ class string;
|
|||
|
||||
%typemap(typecheck) string = char *;
|
||||
|
||||
%typemap(throws) string %{
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1.c_str());
|
||||
return $null;
|
||||
%}
|
||||
|
||||
// const string &
|
||||
%typemap(jni) const string & "jstring"
|
||||
%typemap(jtype) const string & "String"
|
||||
|
|
@ -94,6 +99,11 @@ class string;
|
|||
|
||||
%typemap(typecheck) const string & = char *;
|
||||
|
||||
%typemap(throws) const string & %{
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1.c_str());
|
||||
return $null;
|
||||
%}
|
||||
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue