From f43fbc6ec3b1e4fd4e370a1b8169c33bee199d5f Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 2 May 2003 21:28:31 +0000 Subject: [PATCH] jni code correction git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4767 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/java/typemap/example.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/java/typemap/example.i b/Examples/java/typemap/example.i index a29c717d9..7c97e6673 100644 --- a/Examples/java/typemap/example.i +++ b/Examples/java/typemap/example.i @@ -62,7 +62,7 @@ void f2(char *BYTE); /* Take a copy of the C string as the typemap is for a non const C string */ jmethodID capacityID = (*jenv)->GetMethodID(jenv, sbufClass, "capacity", "()I"); - jint capacity = (jint) (*jenv)->CallObjectMethod(jenv, $input, capacityID); + jint capacity = (*jenv)->CallIntMethod(jenv, $input, capacityID); $1 = (char *) malloc(capacity+1); strcpy($1, pCharStr);