Corrected scope for C variable declaration in typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4557 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ec550c3c92
commit
cab9f95a8e
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(javain) (char *str, int len) "$javainput"
|
||||||
|
|
||||||
%typemap(in) (char *str, int len) (jstring js) %{
|
%typemap(in) (char *str, int len) (jstring js) {
|
||||||
int index=0;
|
int index = 0;
|
||||||
|
|
||||||
js = (jstring) (*jenv)->GetObjectArrayElement(jenv, $input, index);
|
js = (jstring) (*jenv)->GetObjectArrayElement(jenv, $input, index);
|
||||||
$1 = (char *) (*jenv)->GetStringUTFChars(jenv, js, 0);
|
$1 = (char *) (*jenv)->GetStringUTFChars(jenv, js, 0);
|
||||||
$2 = (*jenv)->GetStringUTFLength(jenv, js);
|
$2 = (*jenv)->GetStringUTFLength(jenv, js);
|
||||||
%}
|
}
|
||||||
|
|
||||||
/* Return the mutated string as a modified element in the array. */
|
/* Return the mutated string as a modified element in the array. */
|
||||||
%typemap(argout) (char *str, int len) {
|
%typemap(argout) (char *str, int len) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue