Storing C++ data in an instance field using CNI?
Andrew Haley
aph@redhat.com
Sat May 29 00:49:00 GMT 2004
Tom Tromey writes:
> >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
>
> Andrew> Except, as I think I mentioned before, for alignment issues. It would
> Andrew> be nice to have a type that handled this properly, and Bryce's
> Andrew> "RawDataMarked" would do it. I would prefer it if a byte array was
> Andrew> fully aligned, but of course that would be a CNI special feature.
>
> You could use long[] instead.
You could, but it wouldn't be legal C -- it would be an aliasing
error. Actually, I dunno if even byte[] is legal -- it's a "character
type" that has the magic property of being convertible to any other
type.
Andrew.
More information about the Java
mailing list