Calling java code from C/C++ code.
Timothy Wall
twall@oculustech.com
Fri Mar 2 13:23:00 GMT 2001
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 ]
More information about the Java
mailing list