How do you map in Nim a function with this signature:
void FunctionName(UObject* Context, FFrame& Stack, void*const Result) {..}
Run
And then cast the type so it can be accepted as one argument only of
FNativeFuncPtr which comes defined as:
typedef void (*FNativeFuncPtr)(UObject* Context, FFrame& TheStack,
RESULT_DECL);
Run
So I can create a Function in nim like so
proc SetNativeFunc*(ufunc: UFunction, funcPtr: FNativeFuncPtr) : void
{.importcpp: "#->SetNativeFunc(#)", header: "UObject/Class.h" .}
proc NimFunctionToReplace*(context:ptr UObject, stack:ptr FFrame,
result:ptr void) = ....
SetNativeFunc(NimFunctionToReplace)
Run
Thanks,
Juan