[foreign-jextract] RFR: 8258605: regression: jextract can not handle function prototypes as function arguments
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Thu Dec 17 17:54:13 UTC 2020
On Thu, 17 Dec 2020 17:26:57 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:
> Old fix is not applicable in the new code. But test brought and modified.
Added some comments to simplify the logic in OutputFactory
src/jdk.incubator.jextract/share/classes/jdk/internal/jextract/impl/OutputFactory.java line 364:
> 362: return getAsFunctionPointer(((Type.Delegated) type).type());
> 363: }
> 364: } else if (type instanceof Type.Function) {
I think the check before this can be simplified. Essentially, in this routine we should have three cases:
* we have found a function type -> return it
* we have found a delegate type -> recurse on the delegatee
* none of the above, return null
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/424
More information about the panama-dev
mailing list