Function TVMFFIEnvModLookupFromImports#
Defined in File c_env_api.h
Function Documentation#
-
int TVMFFIEnvModLookupFromImports(TVMFFIObjectHandle library_ctx, const char *func_name, TVMFFIObjectHandle *out)#
FFI function to lookup a function from a module’s imports.
This is a helper function that is used by generated code.
Note
The returned function is a weak reference that is cached/owned by the module.
- Parameters:
library_ctx – The library context module handle.
func_name – The name of the function.
out – The result function.
- Returns:
0 when no error is thrown, -1 when failure happens