RFR: 7903704: Expose addresses of native functions

Jorn Vernee jvernee at openjdk.org
Tue Apr 2 15:12:22 UTC 2024


Add accessors for the address of a native function. This follows the jextract principle to expose all the information it has as well.

The address is useful in cases where a user needs to pass the address of a native function to be used as a callback by another (higher-order) native function.

Note: while working on this I noticed that the `TestUtils` file was not being rebuilt when dependent tests were running. Many tests depend on this file to compile generated source code for instance. I've added the needed `@build` tags, and `lib.build` property (the latter only works for the tests under `TestNG.dirs`).

-------------

Commit messages:
 - expose function addresses
 - Add @build testlib.TestUtils

Changes: https://git.openjdk.org/jextract/pull/228/files
  Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=228&range=00
  Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903704
  Stats: 176 lines in 47 files changed: 169 ins; 1 del; 6 mod
  Patch: https://git.openjdk.org/jextract/pull/228.diff
  Fetch: git fetch https://git.openjdk.org/jextract.git pull/228/head:pull/228

PR: https://git.openjdk.org/jextract/pull/228


More information about the jextract-dev mailing list