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

Function Object_MoveFromAny

examples/abi_overview/example_code.c:152–159  ·  view source on GitHub ↗

[Object.MoveFromAny.begin]

Source from the content-addressed store, hash-verified

150
151// [Object.MoveFromAny.begin]
152void Object_MoveFromAny(TVMFFIAny* any, TVMFFIObject** obj) {
153 assert(any->type_index >= kTVMFFIStaticObjectBegin);
154 *obj = any->v_obj;
155 (*any) = (TVMFFIAny){0};
156 if (!IS_OWNING_ANY) {
157 TVMFFIObjectIncRef(*obj);
158 }
159}
160// [Object.MoveFromAny.end]
161
162// [Object.Destroy.begin]

Callers

nothing calls this directly

Calls 1

TVMFFIObjectIncRefFunction · 0.85

Tested by

no test coverage detected