better director support for reference types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9097 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b98445c19f
commit
bdc28f90ca
1 changed files with 8 additions and 2 deletions
|
|
@ -598,11 +598,17 @@
|
|||
%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE *, SWIGTYPE (CLASS::*)
|
||||
%{ *(($&1_ltype)&$input) = ($1_ltype) $1; %}
|
||||
|
||||
%typemap(directorout) SWIGTYPE &
|
||||
%{ if (!$input) {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Unexpected null return for type $1_type");
|
||||
return $null;
|
||||
}
|
||||
$1 = ($1_ltype)$input; %}
|
||||
%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE &
|
||||
%{ *($&1_ltype)&$input = ($1_ltype) &$1; %}
|
||||
|
||||
%typemap(javadirectorin) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE &, const SWIGTYPE & "new $javaclassname($jniinput, false)"
|
||||
%typemap(javadirectorout) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE &, const SWIGTYPE & "$javaclassname.getCPtr($javacall)"
|
||||
%typemap(javadirectorin) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE & "new $javaclassname($jniinput, false)"
|
||||
%typemap(javadirectorout) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE & "$javaclassname.getCPtr($javacall)"
|
||||
|
||||
/* Default array handling */
|
||||
%typemap(in) SWIGTYPE [] %{ $1 = *($&1_ltype)&$input; %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue