jni code correction

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4767 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-05-02 21:28:31 +00:00
commit f43fbc6ec3

View file

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