Array of booleans
forax at univ-mlv.fr
forax at univ-mlv.fr
Thu Mar 18 15:43:58 UTC 2021
----- Mail original -----
> De: "Maurizio Cimadamore" <maurizio.cimadamore at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "panama-dev at openjdk.java.net'" <panama-dev at openjdk.java.net>
> Envoyé: Jeudi 18 Mars 2021 16:31:12
> Objet: Re: Array of booleans
> On 18/03/2021 15:28, forax at univ-mlv.fr wrote:
>> It works with JNI, boolean is mapped into an unsigned 8 bits
>> https://docs.oracle.com/en/java/javase/16/docs/specs/jni/types.html
>
> Yeah - it seems to be a case of different specs pointing to different
> decisions :-)
>
> If the format of booleans is truly unspecified at the JVMS level (which
> seems to be the case), then it seems like JNI is taking things a step
> too far?
I don't think you can practically interact with the C world if you do not fully specify the memory layout of all the primitive types of Java, hence jboolean being defined as an unsigned byte.
>
> Maurizio
Rémi
More information about the panama-dev
mailing list