[foreign] RFR: typeful upcalls do not work
Henry Jen
henry.jen at oracle.com
Fri Jun 8 15:59:05 UTC 2018
Looks good to me.
Cheers,
Henry
> On Jun 8, 2018, at 8:30 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>
> Hi,
> I realized that UpcallHandler doesn't cope well with typeful callbaks - e.g. when a callback features generic types (e.g. Pointer<Integer>) in argument position. This is due to the fact that UpcallHandler throws away info asscoaited with the reflective method (which has generic signatures available) and uses MethodType instead.
>
> This patch corrects that. In doing so, I also took the opportunity to remove some obsolete constraints from the impl:
>
> * callback must have @FunctionalInterface in there
>
> * callback method should be called 'fn'
>
> Webrev:
>
> http://cr.openjdk.java.net/~mcimadamore/panama/typed_upcall/
>
> Cheers
> Maurizio
>
More information about the panama-dev
mailing list