mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
java: converted all int16_t* to short[] and updated examples
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
6e2355ce9a
commit
ba43986f82
@ -5,17 +5,17 @@
|
||||
#include "hmc5883l.h"
|
||||
%}
|
||||
|
||||
%typemap(jni) int16_t* "jintArray"
|
||||
%typemap(jstype) int16_t* "int[]"
|
||||
%typemap(jtype) int16_t* "int[]"
|
||||
%typemap(jni) int16_t* "jshortArray"
|
||||
%typemap(jstype) int16_t* "short[]"
|
||||
%typemap(jtype) int16_t* "short[]"
|
||||
|
||||
%typemap(javaout) int16_t* {
|
||||
return $jnicall;
|
||||
}
|
||||
|
||||
%typemap(out) int16_t *coordinates {
|
||||
$result = JCALL1(NewIntArray, jenv, 3);
|
||||
JCALL4(SetIntArrayRegion, jenv, $result, 0, 3, (const signed int*)$1);
|
||||
$result = JCALL1(NewShortArray, jenv, 3);
|
||||
JCALL4(SetShortArrayRegion, jenv, $result, 0, 3, (jshort*)$1);
|
||||
//delete [] $1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user