[foreign-jextract] RFR: 8262733: jextract generates clashing names which results in compilation error with javac [v3]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Mar 1 14:04:52 UTC 2021


On Mon, 1 Mar 2021 13:28:15 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

>> name clash is avoided by checking surrounding class names
>
> Athijegannathan Sundararajan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review comments

src/jdk.incubator.jextract/share/classes/jdk/internal/jextract/impl/StructBuilder.java line 154:

> 152:         incrAlign();
> 153:         indent();
> 154:         append(MEMBER_MODS + " " + type.getSimpleName() + " " + javaName + "$get(MemorySegment " + safeParameterName("seg") + ") {\n");

In this, and other methods, we could at least cache the safe name into a local and reuse it later?

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

PR: https://git.openjdk.java.net/panama-foreign/pull/462


More information about the panama-dev mailing list