mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
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:
parent
dc7e33558e
commit
83cb6dc2fd
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user