I have written some code which passes values between java and c using jni.
Currently all numerics are defined as int (java) -> jnit (jni/c) -> unsigned int (c)
The code works but it is REALLY inefficient because not all the numbers being pass need the memory available to an integer.
I have 3 types of values in my code which need to hold number ranges 0 to 4294967295, 0 to 255 and 0 to 1.
I can't work out compatible data types across all 3 "languages".
Range Java C/JNI C
4294967296 int jint unsigned int
256 ??? ??? unsigned char
2 boolean jboolean ???
Can you please advise what data types I need to use for the ???s above?
Thanks G