RFR: 8347408: Create an internal method handle adapter for system calls with errno [v4]
Per Minborg
pminborg at openjdk.org
Wed May 7 08:54:44 UTC 2025
On Wed, 7 May 2025 03:19:53 GMT, Shaojin Wen <swen at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address comments
>
> src/java.base/share/classes/jdk/internal/foreign/CaptureStateUtil.java line 78:
>
>> 76: inputs.add(new BasicKey(c, layout.name().orElseThrow()));
>> 77: }
>> 78: }
>
> Suggestion:
>
> for (MemoryLayout layout : CAPTURE_LAYOUT.memberLayouts()) {
> String name = layout.name().orElseThrow();
> inputs.add(new BasicKey(int.class, name));
> inputs.add(new BasicKey(long.class, name));
> }
>
> There are only two classes, int.class and long.class, so this might be simpler.
I like the existing code better, but I'll guess that is a matter of taste.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25043#discussion_r2077145341
More information about the core-libs-dev
mailing list