A few considerations (mostly) on jextract
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Fri May 28 16:36:12 UTC 2021
On 28/05/2021 16:26, Markus Knetschke wrote:
> At least in the current preview
> FuseFileInfo(MemoryAddress addr) {
> this.seg = addr.asSegment(org.fuse.fuse_file_info.sizeof());
> }
> doesn't compile and I can't see a asSegment method with only a size
> parameter in
> https://urldefense.com/v3/__https://download.java.net/java/early_access/panama/docs/api/jdk.incubator.foreign/jdk/incubator/foreign/MemoryAddress.html__;!!GqivPVa7Brio!MvdeQzXPIWBfDnE1gVrydkgUwGsPicM0fGxjIYk2pQnNLotNgzeRrj7C2p_m33TOp_aScFI$
> https://urldefense.com/v3/__https://github.com/openjdk/panama-foreign/blob/foreign-jextract/src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryAddress.java__;!!GqivPVa7Brio!MvdeQzXPIWBfDnE1gVrydkgUwGsPicM0fGxjIYk2pQnNLotNgzeRrj7C2p_m33TOzPW8Zqo$
>
> Best regards,
> Markus Knetschke
It's:
addr.asSegment(org.fuse.fuse_file_info.sizeof(),
ResourceScope.globalScope())
This does the same thing as the method it replaces (globalScope()
accesses a static final constant, no instance creation worries :-) )
Maurizio
More information about the panama-dev
mailing list