1 %module javaupm_mma7455 2 %include "../upm.i" 3 %include "typemaps.i" 4 %include "arrays_java.i"; 5 %include "../java_buffer.i" 6 7 %apply short *OUTPUT { short * ptrX, short * ptrY, short * ptrZ }; 8 9 %typemap(jni) short* "jshortArray" 10 %typemap(jstype) short* "short[]" 11 %typemap(jtype) short* "short[]" 12 13 %typemap(javaout) short* { 14 return $jnicall; 15 } 16 17 %typemap(out) short *readData { 18 $result = JCALL1(NewShortArray, jenv, 3); 19 JCALL4(SetShortArrayRegion, jenv, $result, 0, 3, (const signed short*)$1); 20 delete [] $1; 21 } 22 23 %ignore readData(short *, short *, short *); 24 25 %{ 26 #include "mma7455.h" 27 %} 28 29 %include "mma7455.h" 30