I think you r looking for:

Mapping types

The following table shows the mapping of types between Java and native code.
  Native Type Java Language Type Description Type signature unsigned char
jboolean unsigned 8 bits Z signed char jbyte signed 8 bits B unsigned short
jchar unsigned 16 bits C short jshort signed 16 bits S long jint signed 32
bits I

long long
__int64
jlong signed 64 bits J float jfloat 32 bits F double jdouble 64 bits D


In addition, the signature "L fully-qualified-class ;" would mean the class
uniquely specified by that name; e.g., the signature "Ljava/lang/String;"
refers to the class java.lang.String. Also, prefixing [ to the signature
makes the array of that type; for example, [I means the int array type.

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.

However, mapping between Java Strings and arrays to native strings and
arrays is different. If you use a jstring in where a char * would be, your
code could crash the JVM.
Cheers...

BR,
Chand

On Tue, Dec 1, 2009 at 2:14 AM, fadden <[email protected]> wrote:

> On Nov 30, 9:08 am, bacchus <[email protected]> wrote:
> > I'm looking for specific information about Android JNI Call Bridge.
> > The one that exists does not suffices my needs.
>
> The "JNI call bridge" is a bit of code that converts an array of 32-
> bit values into C-style arguments.  It takes into account host-
> specific calling conventions, notably which arguments go into which
> registers (by type or position), which go onto the stack, and how
> values should be padded.
>
> The sources include a version based on libffi (slow) and a few CPU-
> specific implementations (ARM EABI, SH4, x86).
>
> > I would like to understand the mappings performed between C/C++ data
> > types and Java data types.
> >
> > As an example, I would like to understand where and how the VMRuntime
> > object is defined and mapped.
>
> This is beyond the scope of the JNI function call interface.  If you
> want higher-level object to interact more directly, you may need to
> look into Cygnus CNI (requires compiler support) or JNA (convenience,
> but at a price).
>
> Was there something specific about VMRuntime that interested you?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Reply via email to