MCPcopy Create free account
hub / github.com/apache/tvm-ffi / Any_AnyView_GetObject

Function Any_AnyView_GetObject

examples/abi_overview/example_code.c:123–131  ·  view source on GitHub ↗

[Any_AnyView.GetObject.begin]

Source from the content-addressed store, hash-verified

121
122// [Any_AnyView.GetObject.begin]
123TVMFFIObject* Any_AnyView_GetObject(const TVMFFIAny* value) {
124 if (value->type_index == kTVMFFINone) {
125 return NULL; // Handling nullptr if needed
126 } else if (value->type_index >= kTVMFFIStaticObjectBegin) {
127 return value->v_obj;
128 }
129 assert(0); // FAILED: not a TVM-FFI object
130 return NULL;
131}
132// [Any_AnyView.GetObject.end]
133
134// [Object.IsInstance.begin]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected