[Prev][Next][Index][Thread]

a table of c funtion pointers



When I call JNI_CreateJavaVM, essentially I get a table of function
pointers back, stored in jenv.  How do I define the table.

define C-subtype <JNIEnv> (<JNINativeInterface_*>) end;

define C-struct <JNINativeInterface_>
  sealed inline-only slot reserved0 :: <C-void*>;
  sealed inline-only slot reserved1 :: <C-void*>;
  sealed inline-only slot reserved2 :: <C-void*>;
  sealed inline-only slot reserved3 :: <C-void*>;
  sealed inline-only slot get-version ::  ???;
  ...
  pointer-type-name: <JNINativeInterface_*>;
end;

What should be filled in the ??? slot above.  Is it just
<c-function-pointer> ?
If so, how would I call the function safely.

Second question.  How do I declare a vararg function and use it in
Dylan.

BTW, has anyone written an interface to create a Java virtual machine
and invoke
Java methods within Dylan so that I am not duplicating the effort?

Futeh





Follow-Ups: