[foreign-jextract] [Rev 01] RFR: 8246341: jextract should generate Cpointer utilities class
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Tue Jun 2 14:55:23 UTC 2020
On Tue, 2 Jun 2020 14:55:08 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:
>> Added Cpointer utilities class to deal with pointer values from C code.
>
> Athijegannathan Sundararajan has updated the pull request incrementally with one additional commit since the last
> revision:
> * missed EXPORT for 'func'
> * missed func call and assertion to check callback was reached.
> * renamed "resize" to "asArray"
Looks a good usability boost. Few observation:
* to me, `resize` is a general property of all accessor helpers. In fact I'd call it more as `asArray` to suggest that it
just cast the incoming address to a correctly sized address
* I think you can reuse existing template for addresses too - by providing a `VarHandle` constructed with the appropriate
combinator method.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/191
More information about the panama-dev
mailing list