admin管理员组文章数量:1352869
So I'm trying to invoke a foreign Java method annotated with @CEntryPoint
from a Python application. The input to the method should be a C struct generated from a Python dict and the output, a C struct that's parsed into a Python dict for further handling.
I've failed to find any official docs/resources on passing/returning anything other than primitive types or string. How can I modify the method below such that a complex data type can be passed from Python to Java and back? Additionally, is the approach I've described the faster way of communicating between Python and Java and what could be a better alternative?
@CEntryPoint(name = "call_engine")
public static Output callEngine(IsolateThread thread, Input input) {
final String id = input.getId();
final Map<String, String> input.getMap();
...
}
本文标签:
版权声明:本文标题:how to call a java @entrypoint method (of a graalvm native image shared library) with non-primitive types from C - Stack Overflo 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743919421a2561812.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论