Function TVMFFIFunctionCreate

Function TVMFFIFunctionCreate#

Function Documentation#

int TVMFFIFunctionCreate(void *self, TVMFFISafeCallType safe_call, void (*deleter)(void *self), TVMFFIObjectHandle *out)#

Create a FFIFunc by passing in callbacks from a C callback. The registered function can then be retrieved by the backend using its name.

Parameters:
  • self – The resource handle of the C callback.

  • safe_call – The C callback implementation.

  • deleter – The deleter to recycle.

  • out – The output of the function.

Returns:

0 on success, nonzero on failure.