On 11/13/05, Daishi Kato <[EMAIL PROTECTED]> wrote: > > I am thinking of wappring JNI (Java Native Interface) > for chicken. The problem I'm facing right now is > that I don't know how to wrap va_list arguments.
JNI wrappers would be nice, indeed. > > from jni.h > void (JNICALL *CallStaticVoidMethod) (JNIEnv *, jclass, jmethodID, > ...); > void (JNICALL *CallStaticVoidMethodV) (JNIEnv *, jclass, jmethodID, > _Jv_va_list); > void (JNICALL *CallStaticVoidMethodA) (JNIEnv *, jclass, jmethodID, > jvalue *); > one of these should be wrapped. > The point is that I need to specify types from the caller. > I'd like to ask if it is possible, and give me a hint. > Unfortunately, varargs can't be wrapped properly, I suggest you use the ...A versions. You probably want to map the argument list to your wrapper into a jvalue *. You should have type-information directly from the passed arguments and could build the jvalue-Array before the call (Unless I misunderstand your intentions). > Attached file is my work so far. Sorry, I can't find the attachment. Could you send it again? cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
