[foreign] RFR: typeful upcalls do not work
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Fri Jun 8 15:30:19 UTC 2018
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