Re: Swap jlong id[1] ?
Re: Swap jlong id[1] ?
- Subject: Re: Swap jlong id[1] ?
- From: Eric Albert <email@hidden>
- Date: Wed, 19 Apr 2006 19:48:36 +0100
On Apr 19, 2006, at 6:24 PM, rohit dhamija wrote:
Hi,
I am working on
Mac OS 10.4.5 PowerPC and Intel Mac
Xcode 2.2
Currently developing JNILib and need to swap data present in jlong
id[1]
/////
jlong id[1];
(*env)->GetLongArrayRegion(env, ident, 0, idsize, id);
//////
Is there any swap routine provided for swapping long arrays ?
You mean that you need to byte-swap it? A jlong is a long long, so
you can swap it with the 64-bit swapping functions in /usr/include/
libkern/OSByteOrder.h. To swap an array of them, call the byte-
swapping function of your choice in a for loop.
Hope this helps,
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden