This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where to find a CNI-Tutorial?


> > >> 2.) Is there a platform-independent way to store pointer-values in 
> > >> java variables using CNI. With JNI this isnt possible as far as I 
> > >> know, because storing pointer-values into "int" only works of cource 
> > >> on 32-bit machines.... 
> > >
> > >Then why not storing them into "long"?
> > 
> > This doesn't work. Under Win64, for example, a void* is 64 bits
> > but a long is still 32 bits.
>
>No; he's talking about a jlong.

Oops. Should have thought for two more seconds before hitting [Send]....
I've been coding in C++ for the last couple of days.

So I guess the right answer would be "Because a RawData is guaranteed
to properly represent a pointer without making architecture-specific
assumptions about its width."

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]