This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Calling java code from C/C++ code.
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: Calling java code from C/C++ code.
- From: Timothy Wall <twall at oculustech dot com>
- Date: Fri, 02 Mar 2001 16:23:41 -0500
- CC: tromey at redhat dot com, java at gcc dot gnu dot org
- Organization: Oculus Technologies
- References: <3A9BE61C.3F2936FC@cygnus.com> <87u25grna6.fsf@creche.redhat.com> <3A9BFC3A.800ADB7C@oculustech.com> <3A9C18C6.DA0EF9E4@albatross.co.nz> <3A9FF5C5.9BC6DB6F@oculustech.com> <3AA00B3A.EB219691@albatross.co.nz>
- Reply-To: twall at oculustech dot com
Thanks. Class.h and prims.cc didn't apply cleanly, but I've got them compiling
now...
T.
Bryce McKinlay wrote:
> Timothy Wall wrote:
>
> > I tried the patch but apparently it didn't apply cleanly to Class.h. Can you
> > post the correct Class constructors?
>
> With the patch, there is only one C++ constructor for class:
>
> Class ()
> {
> // C++ ctors set the vtbl pointer to point at an offset inside the vtable
> // object. That doesn't work for Java, so this hack adjusts it back.
> void *p = ((void **)this)[0];
> ((void **)this)[0] = (void *)((char *)p-2*sizeof (void *));
> };
>
> (reading the patch may be confusing because the other one is commented out
> instead of removed. sorry about that)
>
> regards
>
> [ bryce ]