Please return a long/64 bits Window address. Lemme know what gets stored in in the
java int valiable "lets_store_a_32_bit_address", which has the capacity to store 32
bits. I'm sorry, I thought a fairly simply program sample would demonstrate it best.
While ur pondering this porting delima, may u can figure out the other points that I
was attempting, but failed to make to u. Again I'm sorry for my failure.
Jeff Galyan wrote:
> Uncle George wrote:
> > 5) In the land of alpha longs are 64bits as well as address pointers =>
> >
> > .java
> > int lets_store_a_32_bit_address;
> > private native int wheres_my_window();
> > lets_store_a_32_bit_address = wheres_my_window();
> > ......
> >
> > Native .c
> > int wheres_my_window(blah*,blah ){
> > long addr;
> > addr = (Window) w;
> > return(addr);
> > }
> > This particular example results in the truncation of a returned 64 bit 'c'
>address, into a 32bit '.java' variable/storage. u can of course change the 'c'
>routine to return all 64bits, but that will be, eventually, truncated by the jvm to
>32bits. In the Land of "OSF/true64" for the Dec Alpha, u can convince the compiler to
>produce 32bit pointer arithemetic, where long == 32bits. But the currently available
>linux/alpha compilers a long==pointer==64bits.
>
> Your example is flawed in that you assume you should return an int from
> wheres_my_window(blah*, blah). If you return a long, everything is fine,
> since in the land of Java, long is defined as a 64-bit data type.
>
> >
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]