Fix for directorin char[ANY] typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5990 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9d70f8449a
commit
52d0d774ab
1 changed files with 8 additions and 1 deletions
|
|
@ -320,6 +320,7 @@
|
|||
if (!$input) return $null;
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(freearg) char * { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); }
|
||||
%typemap(out) char * { if($1) $result = JCALL1(NewStringUTF, jenv, $1); }
|
||||
%typemap(javadirectorin) char * "$jniinput"
|
||||
|
|
@ -523,7 +524,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
%typemap(directorin,descriptor="Ljava/lang/String;") char[ANY] "$input = JCALL1(NewStringUTF, jenv, $1_name);"
|
||||
%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] ""
|
||||
%typemap(freearg) char[ANY] { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue