| 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); |
no test coverage detected