java: fix Java return type for readData in MMA7455
Signed-off-by: Petre <petre.p.eftime@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
@@ -10,4 +10,20 @@
|
||||
#include "mma7455.h"
|
||||
%}
|
||||
|
||||
%typemap(jni) short* "jshortArray"
|
||||
%typemap(jstype) short* "short[]"
|
||||
%typemap(jtype) short* "short[]"
|
||||
|
||||
%typemap(javaout) short* {
|
||||
return $jnicall;
|
||||
}
|
||||
|
||||
%typemap(out) short *readData {
|
||||
$result = JCALL1(NewShortArray, jenv, 3);
|
||||
JCALL4(SetShortArrayRegion, jenv, $result, 0, 3, (const signed short*)$1);
|
||||
delete [] $1;
|
||||
}
|
||||
|
||||
%ignore readData(short *, short *, short *);
|
||||
|
||||
%include "mma7455.h"
|
||||
|
||||
Reference in New Issue
Block a user