On Nov 30, 9:15 pm, Suchand Ghosh <chand4andr...@gmail.com> wrote:
> Here, these types are interchangeable. You can use jint where you normally
> use an int, and vice-versa, without any
> typecasting<http://en.wikipedia.org/wiki/Typecast>required.

...sometimes.  On current Android systems, "int" and "long" are both
32-bit, so you're okay with jint==int, but if you assume jlong==long
you will be disappointed.  For portability you may not want to assume
jint==int.

The JNI types are defined to have specific bit widths, while most C
types aren't, so take care with your assumptions.  Make sure you
always use the JNI types in function prototypes, so at least the
arguments are passed in and returned correctly.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to