[nicl] Be more tolerant to zero-length

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue May 29 11:41:13 UTC 2018


Looks good

Maurizio



On 25/05/18 23:17, Henry Jen wrote:
> 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