[foreign-jextract] RFR: 8261906: Improve jextract support for virtual functions [v6]

Jorn Vernee jvernee at openjdk.java.net
Fri Mar 5 16:05:13 UTC 2021


On Thu, 4 Mar 2021 17:27:54 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> yeah - not great - as the functional interface name might differ significantly from the typedef name in case of clashes...
>
> Can we rely on typedef names being unique? If so, we could build a map String -> FunctionBuilder when we construct a functional interface for a typedef.
> 
> In a header file this should perhaps always be the case - but I've seen that you can have suspicious stuff like
> 
> {
> typedef int a;
> }
> 
> {
> typedef float a;
> }
> But maybe we shouldn't worry about this with C headers?

I'm not sure if typedefs have any scope in C, or if they're just global always. C++ has scoped typedefs, but I think in C every name period is global.

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

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


More information about the panama-dev mailing list