RFR: 7903656: Variadic invoker class names are not mangled [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Feb 9 12:41:17 UTC 2024
On Fri, 9 Feb 2024 11:22:20 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> src/main/java/org/openjdk/jextract/impl/HeaderFileBuilder.java line 593:
>>
>>> 591:
>>> 592: private String newHolderClassName(String javaName) {
>>> 593: String holderClassName = javaName;
>>
>> Strictly speaking, this change is not necessary - but since we emit nested classes with same name as other members for variadic functions too, I don't really see a reason to append the `$constant` prefix to the nested constant class here.
>
> I agree. As long as we can de-conflict the names with extra `$` it should be fine.
In the end, I've reverted this - I realized that I didn't "clean" before running tests and there were several conflicts of the kind already described. The problem is that it is sometimes common to do this:
struct foo { ... } foo;
Which then leads to ambiguities. So I reverted that back. (for variadic, there's no such issue).
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/203#discussion_r1484265780
More information about the jextract-dev
mailing list