-
-
Notifications
You must be signed in to change notification settings - Fork 751
Closed
Labels
Description
int (*sum_func)(int, int) = (int (*)(int, int))LLVMGetFunctionAddress(engine, "sum");
I need to call LLVMGetFunctionAddress
like the C code above in Java, however it returns a pointer and I need to convert it to (int (*)(int, int))
function.
More specifically, I guess the code would be like:
long funAddr = LLVMGetFunctionAddress(engine, "sum")
new Pointer {
//someshow pass the funAddr to it
public native void call( /*parameters here*/ );
}