如何将指向数组的指针从 JNI C 代码发送到 Java 代码?例如 :
JNI C 代码:
jclass cls = (*env)->GetObjectClass(env,obj);
jmethodID mid = (*env)->GetMethodID(env,cls,"print"," ?? "); // What should be the signature here ?
jvalue a1,*arr;
a1.i = 2002;
a1.f = 12.90;
a1.c = 's';
a1.j = 344554;
a1.b = TRUE;
arr = &a1;
(*env)->CallVoidMethodA(env,obj,mid,arr);
Java函数:
public void print(?????) { // what should be the argument here ?
// add code here
}
java 函数应该如何接收指向数组的指针?