java: fix Java arrays for mma7455

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Petre Eftime 2015-09-01 18:55:28 +03:00 committed by Mihai Tudor Panu
parent dc7e33558e
commit 83cb6dc2fd

View File

@ -3,7 +3,6 @@
%include "typemaps.i"
%include "arrays_java.i";
%apply unsigned char[] {unsigned char *};
%apply short *OUTPUT { short * ptrX, short * ptrY, short * ptrZ };
%{
@ -26,4 +25,19 @@
%ignore readData(short *, short *, short *);
%typemap(jni) (unsigned char *buf, unsigned char size) "jbyteArray";
%typemap(jtype) (unsigned char *buf, unsigned char size) "byte[]";
%typemap(jstype) (unsigned char *buf, unsigned char size) "byte[]";
%typemap(javain) (unsigned char *buf, unsigned char size) "$javainput";
%typemap(in) (unsigned char *buf, unsigned char size) {
$1 = (unsigned char *) JCALL2(GetByteArrayElements, jenv, $input, NULL);
$2 = JCALL1(GetArrayLength, jenv, $input);
}
%typemap(freearg) (unsigned char *buf, unsigned char size) {
JCALL3(ReleaseByteArrayElements, jenv, $input, (jbyte *)$1, 0);
}
%include "mma7455.h"