This is the mail archive of the java-discuss@sources.redhat.com 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]

Re: CNI vs interfaces


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

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