From: William F. <wsf...@us...> - 2004-06-15 20:09:42
|
Update of /cvsroot/swig/SWIG/Lib/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16974 Modified Files: java.swg Log Message: Fix for directorin char[ANY] typemap Index: java.swg =================================================================== RCS file: /cvsroot/swig/SWIG/Lib/java/java.swg,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** java.swg 3 Jun 2004 22:26:27 -0000 1.24 --- java.swg 15 Jun 2004 20:09:33 -0000 1.25 *************** *** 321,324 **** --- 321,325 ---- } } + %typemap(freearg) char * { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); } %typemap(out) char * { if($1) $result = JCALL1(NewStringUTF, jenv, $1); } *************** *** 524,528 **** } ! %typemap(directorin,descriptor="Ljava/lang/String;") char[ANY] "$input = JCALL1(NewStringUTF, jenv, $1_name);" %typemap(argout) char[ANY] "" --- 525,535 ---- } ! %typemap(directorin, descriptor="Ljava/lang/String;") char[ANY] { ! $input = 0; ! if ($1) { ! $input = JCALL1(NewStringUTF, jenv, $1); ! if (!$input) return $null; ! } ! } %typemap(argout) char[ANY] "" |