jni-rs / jni-sys

Apache License 2.0
53 stars 19 forks source link

Make `jboolean` an alias for `bool` instead of `u8` #23

Closed rib closed 10 months ago

rib commented 1 year ago

JNI only strictly defines two valid values for a jboolean and there's no consensus on whether other values greater than one will be interpreted as TRUE in all situations.

The safest interpretation is to say that it will lead to undefined behaviour to pass any value besides zero or one as a jboolean.

Addresses https://github.com/jni-rs/jni-rs/pull/400 Closes #19