RFR: 7903239: ofAddress factory of function pointer type is wrong for struct returns
Jorn Vernee
jvernee at openjdk.org
Thu Dec 14 15:35:20 UTC 2023
This is a more up-to-date version of: https://github.com/openjdk/jextract/pull/58 which takes the recent re-writes into account.
For callbacks that return a struct by-value, we need a SegmentAllocator. We can re-use the Arena we use as a scope for the function pointer we are wrapping. If a user wants a different allocator in different circumstances, they can just re-wrap the pointer and pass another Arena.
-------------
Commit messages:
- pass allocator to callbacks that needs it
Changes: https://git.openjdk.org/jextract/pull/162/files
Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=162&range=00
Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903239
Stats: 138 lines in 4 files changed: 137 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jextract/pull/162.diff
Fetch: git fetch https://git.openjdk.org/jextract.git pull/162/head:pull/162
PR: https://git.openjdk.org/jextract/pull/162
More information about the jextract-dev
mailing list