[nicl] RFR: Undefined struct and void*
Henry Jen
henry.jen at oracle.com
Thu May 24 08:36:12 UTC 2018
Hi,
Please review the webrev[1], in which we have a couple modification for jextract,
- Generate empty interface for undefined struct instead of use Void. This actually improve readability and works better than type annotation.
- When void* on the left side of assignment, Pointer<?> works way better than Pointer<Void> as it’s much more convenient. Thus this webrev make jextract emit Pointer<?> for void* for argument in function or a field setter. However, Pointer<?> on the right-hand side doesn’t give much value as it require cast just like Pointer<Void>, additionally Pointer<Pointer<Void>> is much usable then Pointer<Pointer<?>> in case of void**.
- Fix a Array descriptor bug in toString
- StructTest.java and struct.h to test mentioned changes. This also include test for C++ mode which should have gone in with last push, but I missed them. :(
Thoughts?
Cheers,
Henry
[1] http://cr.openjdk.java.net/~henryjen/panama/wildcardPointer/webrev/
More information about the panama-dev
mailing list