[Prev][Next][Index][Thread]
a table of c funtion pointers
-
To: info-dylan@ai.mit.edu
-
Subject: a table of c funtion pointers
-
From: Futeh Kao <futeh@austin.rr.com>
-
Date: Sat, 22 Jul 2000 20:15:01 -0400 (EDT)
-
Organization: Giganews.Com - Premium News Outsourcing
-
Xref: traf.lcs.mit.edu comp.lang.dylan:12496
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: