RFR jextract generates invalid generic signature for pointer to a function typedef

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Mon Jul 9 17:30:59 UTC 2018


Thanks Henry. I'll change the fix and push.

-Sundar

On 09/07/18, 10:54 PM, Henry Jen wrote:
> Good catch of the bug. The webrev looks good.
>
> In HeaderFile.java, it’s probably better  to unwrap type at the native level instead of JType. The define process is to figure out Java type for a native type after all.
>
> --- a/src/jdk.jextract/share/classes/com/sun/tools/jextract/HeaderFile.java     Thu Jul 05 08:43:46 2018 -0700
> +++ b/src/jdk.jextract/share/classes/com/sun/tools/jextract/HeaderFile.java     Mon Jul 09 08:50:04 2018 -0700
> @@ -253,7 +253,7 @@
>                   jt = doRecord(t);
>                   break;
>               case Pointer:
> -                Type pointee = t.getPointeeType();
> +                Type pointee = t.getPointeeType().canonicalType();
>                   jt2 = (JType2) globalLookup(pointee);
>                   jt = jt2.getDelegate();
>                   if (jt instanceof JType.Function) {
>
> Cheers,
> Henry
>
>
>
>> On Jul 9, 2018, at 8:36 AM, Sundararajan Athijegannathan<sundararajan.athijegannathan at oracle.com>  wrote:
>>
>> Please review: http://cr.openjdk.java.net/~sundar/pointer_to_function_typedef/webrev.00/
>>
>> Thanks,
>> -Sundar


More information about the panama-dev mailing list