CNI vs interfaces

Tom Tromey tromey@cygnus.com
Wed Aug 2 19:55:00 GMT 2000


Bryce> One way might be to make a dummy "JInterface" C++ class and
Bryce> have gcjh make interfaces inherit from this in addition to
Bryce> java.lang.Object. Would this work? Or is there a better option?

One option would be to treat interfaces via real multiple inheritance,
and change g++ to generate the appropriate call for Java objects whose
class uses MI.  This might be hairy.

Another choice would be an attribute on the class.  This is probably
more straightforward, but also more hacky.

We should really ask the g++ maintainers what they want.

At the very least it would be good to have the compiler give an error
if you try to all through an interface from C++.

Tom


More information about the Java mailing list