This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
CNI for C
- From: Andrew Haley <aph at redhat dot com>
- To: Geert Bevin <gbevin at uwyn dot com>
- Cc: gcj <java at gcc dot gnu dot org>
- Date: Wed, 7 Apr 2004 12:23:55 +0100
- Subject: CNI for C
- References: <1081336633.9983.66.camel@localhost>
Geert Bevin writes:
>
> is there anything underway to offer something similar to CNI but then
> for C and not for C++?
We haven't been working on this.
How would you do it? What is the C equivalent of the this pointer, or
a virtual function? I suppose we could write a bunch of macros to do
the job, but would anyone use them?
> The Gnome project has been working very hard on Mono since "it
> provides much better C integration than java". If GCJ would provide
> an easy way to create native C bindings, then there's a much better
> chance for it being adopted more widely in the Gnome community and
> Java becoming a worthy alternate development language for it.
That's a very interesting idea. However, the resistance to using CNI
has been that
* We can't use VM-specific features that may be useful, such as CNI.
<http://ometer.com/desktop-language.html>
So even if we did create C-CNI, wouldn't this still be the case?
People would still not want to use it, because it's VM specific.
Andrew.