Etienne Gagnon wrote:
> Can JNI actually be implemented on a 16-bit per byte system?
> Anybody has a reasonable answer?

Such a system, to implement JNI, will have to have a compiler-defined extension for a signed 8-bit byte type, a bit like the GNU "long long" extension. ANSI C allows a compiler to add additional types, as long as it implements the standard ones.

It will also need an unsigned 8 bit quantity (jboolean), signed and unsigned 16 bit ones (jshort, jchar), signed 32 and 64 bit quantities (jint, jlong), and (the stinger) 32 bit and 64 bit floating point values (jfloat, jdouble).

Now, I'm not sure how many people who use JNI are going to actually depend upon a jfloat being exactly 32 bits long (and not one bit more!) or a jdouble being exactly 64 bits long, but according to table 3-1 in the JNI spec they are indeed entitled to make that assumption. So, any C compiler that you want to write JNI code with had better have a way to specify floating point types with those lengths.


-- Steven Augart

Jikes RVM, a free, open source, Virtual Machine:
http://oss.software.ibm.com/jikesrvm


_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to