MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / notify_lua_state_stop

Function notify_lua_state_stop

src/Chain/libraries/glua/thinkyoung_lua_lib.cpp:1260–1273  ·  view source on GitHub ↗

* notify lvm to stop running the lua stack */

Source from the content-addressed store, hash-verified

1258 * notify lvm to stop running the lua stack
1259 */
1260 void notify_lua_state_stop(lua_State *L) {
1261 int *pointer = get_lua_state_value(L, LUA_STATE_STOP_TO_RUN_IN_LVM_STATE_MAP_KEY).int_pointer_value;
1262
1263 if (nullptr == pointer) {
1264 pointer = (int*)lua_malloc(L, sizeof(int));
1265 *pointer = 1;
1266 GluaStateValue value;
1267 value.int_pointer_value = pointer;
1268 set_lua_state_value(L, LUA_STATE_STOP_TO_RUN_IN_LVM_STATE_MAP_KEY, value, LUA_STATE_VALUE_INT_POINTER);
1269
1270 } else {
1271 *pointer = 1;
1272 }
1273 }
1274
1275 /**
1276 * check whether the lua state notified stop before

Callers 14

luaD_throwFunction · 0.85
luaV_executeFunction · 0.85
stop_vmFunction · 0.85
rollback_storageFunction · 0.85
l_fatalFunction · 0.85

Calls 3

get_lua_state_valueFunction · 0.85
lua_mallocFunction · 0.85
set_lua_state_valueFunction · 0.85

Tested by

no test coverage detected