static inline and jextract
dreamlike_ocean lei
dreamlike.vertx at gmail.com
Sun Sep 4 14:30:40 UTC 2022
English is not my first language
I used jextract to generate a java-bound version of liburing.h.
I found an unreasonable situation。 such as:
`static inline void io_uring_prep_readv`
It is not an exported function,But jextract generates code like this
public static void io_uring_prep_readv(Addressable var0, int var1,
Addressable var2, int var3, long var4)
when I call ` io_uring_prep_readv` in java, It will throw Exception in
thread "main" java.lang.UnsatisfiedLinkError: unresolved symbol:
io_uring_prep_readv
Isn't this unreasonable and inconvenient?Shouldn't only exported functions
be generated?
————————Chinese version—————————————
我利用jextract 生成liburing.h的java绑定
但是我发现了一个很奇怪的情况,像`static inline void
io_uring_prep_readv`这种函数并不是导出的函数,但是jextract 确实生成了这个的java代码。
public static void io_uring_prep_readv(Addressable var0, int var1,
Addressable var2, int var3, long var4)
当我调用用java去调用io_uring_prep_readv时,它会抛出一个Exception in thread "main"
java.lang.UnsatisfiedLinkError: unresolved symbol: io_uring_prep_readv异常
这确实不太合理也不太方便吧,难道不应该只生成导出的函数吗?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jextract-dev/attachments/20220904/963bb979/attachment.htm>
More information about the jextract-dev
mailing list