Panama and Swing/AWT support
Jorn Vernee
jorn.vernee at oracle.com
Mon May 29 17:25:07 UTC 2023
I think this is an issue with the newer versions of LLVM. I remember
seeing this in the past as well. It should work with LLVM version 13.0.0
though.
Jorn
On 29/05/2023 16:18, Maurizio Cimadamore wrote:
>
>
> On 29/05/2023 09:40, Maurizio Cimadamore wrote:
>>> First off I noticed a bug in jextract, it appears that in an
>>> anonymous union the location will be dumped into the name field,
>>> which is invalid on windows. The backslashes need to be escaped.
>>> .withName("union (anonymous at
>>> C:\Users\Clayton\.jdks\openjdk-20.0.1\include\win32\jawt_md.h:42:5)"),
>>> I came across this when generating bindings to jawt on windows. Not
>>> sure if it makes sense to include that path or not but I was able to
>>> get around it by adding a Utils.quote call to Constants.java#340,
>>> like so append(".withName(\"" + Utils.quote(l.name
>>> <https://urldefense.com/v3/__http://l.name__;!!ACWV5N9M2RV99hQ!NZzKVdwoqGo5oDo6E4dLPZ7wZ5GFmFyiaSyGJk4cnIuOIOLfZ5PJL3wOxRylvOSOK-dvRUbJ2aHvsD1hLpnVPww8NZZmWkOH4w$>().get())
>>> + "\")");
>> That seems indeeed a bug - thanks
>
> I'm doing some tests with a simple anon union:
>
> ```
> struct A {
> int x;
> union {
> int a;
> int b;
> };
> };
> ```
>
> This does not create the issue you reported - as the anon union gets
> named "$anon$0" (as it should be).
>
> I have also tried to extract jawt_md.h using jextract 20 here:
>
> https://jdk.java.net/jextract/
>
> And I can't see the odd name you are referring to. Is it possible you
> are using an older jextract version?
>
> Maurizio
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20230529/d4712ef7/attachment.htm>
More information about the panama-dev
mailing list