Corrected scope for C variable declaration in typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4557 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ada6345963
commit
b92650fb4a
1 changed files with 3 additions and 4 deletions
|
|
@ -64,13 +64,12 @@ extern int count(char *bytes, int len, char c);
|
|||
|
||||
%typemap(javain) (char *str, int len) "$javainput"
|
||||
|
||||
%typemap(in) (char *str, int len) (jstring js) %{
|
||||
int index=0;
|
||||
|
||||
%typemap(in) (char *str, int len) (jstring js) {
|
||||
int index = 0;
|
||||
js = (jstring) (*jenv)->GetObjectArrayElement(jenv, $input, index);
|
||||
$1 = (char *) (*jenv)->GetStringUTFChars(jenv, js, 0);
|
||||
$2 = (*jenv)->GetStringUTFLength(jenv, js);
|
||||
%}
|
||||
}
|
||||
|
||||
/* Return the mutated string as a modified element in the array. */
|
||||
%typemap(argout) (char *str, int len) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue