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:
William S Fulton 2003-03-17 10:28:27 +00:00
commit b92650fb4a

View file

@ -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) {