This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: CNI vs interfaces
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: CNI vs interfaces
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Wed, 2 Aug 2000 19:55:52 -0700 (PDT)
- Cc: java-discuss at sourceware dot cygnus dot com
- References: <3988BFF9.F81A7A39@albatross.co.nz>
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