Fix for INOUT and OUTPUT typemaps for when the JNI type is bigger than the c type.

For example unsigned long (32bits) is mapped to jlong (64bits)


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5466 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-12-02 22:29:54 +00:00
commit a9396525e8

View file

@ -229,7 +229,10 @@ value in the single element array. In Java you would use it like this:
%}
%typemap(argout) CTYPE *OUTPUT, CTYPE &OUTPUT
{ JCALL4(Set##JAVATYPE##ArrayRegion, jenv, $input, 0, 1, (JNITYPE *)&temp$argnum); }
{
JNITYPE jvalue = (JNITYPE)temp$argnum;
JCALL4(Set##JAVATYPE##ArrayRegion, jenv, $input, 0, 1, &jvalue);
}
%typemap(typecheck) CTYPE *INOUT = TYPECHECKTYPE;
%typemap(typecheck) CTYPE &INOUT = TYPECHECKTYPE;