RFR: 7903586: Revisit jextract constant classes [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Nov 29 12:02:45 UTC 2023
On Wed, 29 Nov 2023 11:22:16 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> More doc alignment fixes
>
> src/main/java/org/openjdk/jextract/impl/HeaderFileBuilder.java line 258:
>
>> 256: \{MEMBER_MODS} MemoryLayout \{mangledName}() {
>> 257: return \{mangledName};
>> 258: }
>
> Now that we no longer have the constants classes, I wonder if we should just do away with the getter here and just expose the layout field.
>
> I noticed that we are also already exposing the FunctionDescriptor in a functional interface class as a field, as part of this patch,
I wondered that also. I think that, for the context of this PR, I'd like to avoid changes to the shape of the generated code. Should be easy to fix as a followup change. As observed offline, some getters perform extra validation (e.g. null checks).
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/145#discussion_r1409180158
More information about the jextract-dev
mailing list