[foreign-jextract] RFR: 8282235: jextract crashes when a Java keyword is used in as a function pointer typedef parameter name
Athijegannathan Sundararajan
sundar at openjdk.java.net
Tue Feb 22 17:33:13 UTC 2022
On Tue, 22 Feb 2022 17:17:34 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Missed transforming function typedef parameter names as java safe identifiers.
>
> src/jdk.incubator.jextract/share/classes/jdk/internal/jextract/impl/FunctionalInterfaceBuilder.java line 72:
>
>> 70: name = parameterNames.get().get(i);
>> 71: }
>> 72: return name.isEmpty()? "_x" + i : Utils.javaSafeIdentifier(name);
>
> Do we do this for regular native functions?
>
> e.g.
>
> int foo(int abstract);
We already call Utils.javaSafeIdentifier() elsewhere. So this is already taken care of (8262825)
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/653
More information about the panama-dev
mailing list