[foreign-jextract] RFR: 8261906: Improve jextract support for virtual functions [v6]
Jorn Vernee
jvernee at openjdk.java.net
Fri Mar 5 16:05:20 UTC 2021
On Fri, 5 Mar 2021 11:52:59 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> 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.
Godbolt says I'm wrong though :) The example you give is allowed, and the typedef name's scope is restricted to the block
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/456
More information about the panama-dev
mailing list