CNI vs interfaces
Bryce McKinlay
bryce@albatross.co.nz
Wed Aug 2 17:42:00 GMT 2000
One of the current deficiencies of CNI is the inability to call
interface methods from C++ code.
It should be fairly trivial to get the C++ compiler to generate an
interface table rather than vtable lookup, but the question is how to
get it to recognise that a given java reference is, in fact, an
interface reference. Currently, as far as I can tell, gcjh provides no
way for C++ to distinguish between an interface and a regular class.
One way might be to make a dummy "JInterface" C++ class and have gcjh
make interfaces inherit from this in addition to java.lang.Object. Would
this work? Or is there a better option?
regards
[ bryce ]
More information about the Java
mailing list