Function tvm::ffi::reflection::CallFieldSetter#
Defined in File accessor.h
Function Documentation#
-
inline int tvm::ffi::reflection::CallFieldSetter(const TVMFFIFieldInfo *field_info, void *field_addr, const TVMFFIAny *value)#
Call the field setter, dispatching between function pointer and FunctionObj.
When kTVMFFIFieldFlagBitSetterIsFunctionObj is off, invokes the setter as a TVMFFIFieldSetter function pointer. When on, calls via TVMFFIFunctionCall with arguments (field_addr as OpaquePtr, value).
- Parameters:
field_info – The field info containing the setter.
field_addr – The address of the field in the object.
value – The value to set (as a TVMFFIAny pointer).
- Returns:
0 on success, nonzero on failure.