RFR: 7903360: jextract does not handle function pointer return type properly

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Oct 18 09:17:19 UTC 2022


On Tue, 18 Oct 2022 06:09:21 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

> * generating functional interface for pointer to function return types
> * taking care of javadoc comment by using nameAndType function uniformly

src/main/java/org/openjdk/jextract/impl/NameMangler.java line 133:

> 131:     }
> 132: 
> 133:     String getReturnFiName(Declaration.Function func) {

Why can't `getFiName` be reused here?

src/main/java/org/openjdk/jextract/impl/OutputFactory.java line 263:

> 261: 
> 262:         // return type could be a function pointer type
> 263:         Type.Function returnFunc = Utils.getAsFunctionPointer(funcTree.type().returnType());

Did you check the corner case of a function pointer having a function pointer as its return type?

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

PR: https://git.openjdk.org/jextract/pull/90


More information about the jextract-dev mailing list