This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Integration with C


Geert Bevin writes:
 > Andrew Haley wrote:
 > > No, you'll have to write a C interface in C++.  It's still 10-100
 > > times faster than JNI.
 > 
 > Ok. Thanks a lot for this information. Another related question, can I 
 > work with function pointers to execute registered C callback hooks or is 
 > this not possible in the CNI architecture? Otherwise, I'll have to poll 
 > at regular intervals from within the gui, which is a pretty ugly 
 > solution ;-)

Yes, function pointers are fine for calling CNI hooks.  That was one
of the design goals.  However, if you want to call a Java method
you'll have to get the address of the object somehow.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]