\cond Doxygen_Suppress Implementing safe call style
| 187 | /// \cond Doxygen_Suppress |
| 188 | // Implementing safe call style |
| 189 | static int SafeCall(void* func, const TVMFFIAny* args, int32_t num_args, TVMFFIAny* result) { |
| 190 | TVM_FFI_SAFE_CALL_BEGIN(); |
| 191 | TVM_FFI_ICHECK_LT(result->type_index, TypeIndex::kTVMFFIStaticObjectBegin); |
| 192 | FunctionObj* self = static_cast<FunctionObj*>(func); |
| 193 | reinterpret_cast<FCall>(self->cpp_call)(self, reinterpret_cast<const AnyView*>(args), num_args, |
| 194 | reinterpret_cast<Any*>(result)); |
| 195 | TVM_FFI_SAFE_CALL_END(); |
| 196 | } |
| 197 | /// \endcond |
| 198 | /*! \brief Type-erased filed for storing callable object*/ |
| 199 | mutable TCallable callable_; |
nothing calls this directly
no outgoing calls
no test coverage detected