MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / gc0_restore_ptr

Function gc0_restore_ptr

src/builtin/module_builtin_runtime.cpp:1424–1434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1422 }
1423
1424 void * gc0_restore_ptr ( char * name, Context * context ) {
1425 uint64_t hash = hash_function ( *context, name );
1426 auto it = g_static_storage->find(hash);
1427 if ( it!=g_static_storage->end() ) {
1428 void * res = it->second;
1429 g_static_storage->erase(it);
1430 return res;
1431 } else {
1432 return nullptr;
1433 }
1434 }
1435
1436 smart_ptr_raw<void> gc0_restore_smart_ptr ( char * name, Context * context ) {
1437 return gc0_restore_ptr(name,context);

Callers 1

gc0_restore_smart_ptrFunction · 0.85

Calls 4

hash_functionFunction · 0.85
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected