[foreign-jextract] Using many headers splits generated code in package-private classes
Filip Krakowski
filip.krakowski at hhu.de
Fri Dec 11 17:30:57 UTC 2020
Hi,
I am trying to generate bindings for the ucx library
(https://github.com/openucx/ucx). The input I pass to jextract is the
following header file (filename = "ucx.h", package = "org.openucx",
source mode = false).
/// OpenUCX Transports//
//#include <uct/api/uct.h>//
//
//// OpenUCX Protocols//
//#include <ucp/api/ucp.h>//
//
//// I/O Multiplexing//
//#include <sys/epoll.h>//
//#include <sys/eventfd.h>//
//
//// File descriptor utilities//
//#include <fcntl.h>//
//#include <unistd.h>/
It looks like a large amount of the generated code ends up in numbered
package-private classes. As an example, I can't access the MethodHandle
for "eventfd" because it is in a package-private class named
"org.openucx.ucx_h$1". If I remove the includes for "<uct/api/uct.h>"
and "<ucp/api/ucp.h>" the generated method is created in class
"org.openucx.ucx_h" where I can access it./
//
/Is there a way to access code generated in the other (numbered)
package-private classes I'm missing?
Best regards
Filip
More information about the panama-dev
mailing list