[nicl] Be more tolerant to zero-length
Henry Jen
henry.jen at oracle.com
Fri May 25 22:17:18 UTC 2018
Hi,
Please review the webrev[1] fixes a couple places where zero-length data will cause issues. Obvious example is that Scope.toCString(“”) chokes up is really not friendly, have to check for length by caller is too much burden IMHO.
A few function aid converting Java type in Scope is added, also added a Pointer.asDirectBuffer method, these are real use case correspond to JNI NewDirectByteBuffer.
Cheers,
Henry
[1] http://cr.openjdk.java.net/~henryjen/panama/ZeroLength/webrev/
More information about the panama-dev
mailing list