Merged with recent changes from trunk.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@11187 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Maciej Drwal 2009-04-11 16:46:47 +00:00
commit 8c74fa0f46
703 changed files with 21126 additions and 9266 deletions

View file

@ -364,7 +364,7 @@
}
%typemap(freearg, noblock=1) char * { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, (const char *)$1); }
%typemap(out, noblock=1) char * { if($1) $result = JCALL1(NewStringUTF, jenv, (const char *)$1); }
%typemap(out, noblock=1) char * { if ($1) $result = JCALL1(NewStringUTF, jenv, (const char *)$1); }
%typemap(javadirectorin) char * "$jniinput"
%typemap(javadirectorout) char * "$javacall"
@ -378,7 +378,7 @@
$1 = &temp;
}
%typemap(freearg, noblock=1) char *& { if ($1 && *$1) JCALL2(ReleaseStringUTFChars, jenv, $input, (const char *)*$1); }
%typemap(out, noblock=1) char *& { if(*$1) $result = JCALL1(NewStringUTF, jenv, (const char *)*$1); }
%typemap(out, noblock=1) char *& { if (*$1) $result = JCALL1(NewStringUTF, jenv, (const char *)*$1); }
%typemap(out) void ""
%typemap(javadirectorin) void "$jniinput"
@ -597,7 +597,7 @@
/* Generic pointers and references */
%typemap(in) SWIGTYPE *, SWIGTYPE (CLASS::*) %{ $1 = *($&1_ltype)&$input; %}
%typemap(in) SWIGTYPE & %{ $1 = *($&1_ltype)&$input;
if(!$1) {
if (!$1) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "$1_type reference is null");
return $null;
} %}
@ -620,7 +620,8 @@
%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE &
%{ *($&1_ltype)&$input = ($1_ltype) &$1; %}
%typemap(javadirectorin) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE & "new $javaclassname($jniinput, false)"
%typemap(javadirectorin) SWIGTYPE *, SWIGTYPE (CLASS::*) "($jniinput == 0) ? null : new $javaclassname($jniinput, false)"
%typemap(javadirectorin) SWIGTYPE & "new $javaclassname($jniinput, false)"
%typemap(javadirectorout) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE & "$javaclassname.getCPtr($javacall)"
/* Default array handling */
@ -655,7 +656,7 @@
%typemap(argout) char[ANY], char[] ""
%typemap(freearg, noblock=1) char[ANY], char[] { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, (const char *)$1); }
%typemap(out, noblock=1) char[ANY], char[] { if($1) $result = JCALL1(NewStringUTF, jenv, (const char *)$1); }
%typemap(out, noblock=1) char[ANY], char[] { if ($1) $result = JCALL1(NewStringUTF, jenv, (const char *)$1); }
%typemap(javadirectorin) char[ANY], char[] "$jniinput"
%typemap(javadirectorout) char[ANY], char[] "$javacall"
@ -1147,19 +1148,23 @@ SWIG_PROXY_CONSTRUCTOR(true, false, TYPENAME)
SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE)
%typemap(javadestruct, methodname="delete", methodmodifiers="public synchronized") SWIGTYPE {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
$jnicall;
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
$jnicall;
}
swigCPtr = 0;
}
swigCPtr = 0;
}
%typemap(javadestruct_derived, methodname="delete", methodmodifiers="public synchronized") SWIGTYPE {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
$jnicall;
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
$jnicall;
}
swigCPtr = 0;
}
swigCPtr = 0;
super.delete();
}
@ -1190,7 +1195,8 @@ SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE)
#define %javaenum(wrapapproach) %feature("java:enum","wrapapproach")
#define %javamethodmodifiers %feature("java:methodmodifiers")
#define %javaexception(exceptionclasses) %feature("except",throws=exceptionclasses)
#define %nojavaexception %feature("except","",throws="")
#define %nojavaexception %feature("except","0",throws="")
#define %clearjavaexception %feature("except","",throws="")
%pragma(java) jniclassclassmodifiers="class"
%pragma(java) moduleclassmodifiers="public class"