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

Function get_repl_state

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

Source from the content-addressed store, hash-verified

2448 }
2449
2450 int *get_repl_state(lua_State *L)
2451 {
2452 auto node = get_lua_state_value_node(L, LUA_REPL_RUNNING_STATE_KEY);
2453 if (node.type == LUA_STATE_VALUE_INT_POINTER && nullptr != node.value.int_pointer_value)
2454 {
2455 return node.value.int_pointer_value;
2456 }
2457 GluaStateValue value;
2458 value.int_pointer_value = (int*)lua_malloc(L, sizeof(int));
2459 *value.int_pointer_value = 0;
2460 set_lua_state_value(L, LUA_REPL_RUNNING_STATE_KEY, value, LUA_STATE_VALUE_INT_POINTER);
2461 return value.int_pointer_value;
2462 }
2463
2464 bool stop_repl(lua_State *L)
2465 {

Callers 5

stop_replFunction · 0.85
start_repl_asyncFunction · 0.85
check_repl_runningFunction · 0.85
luaL_doREPLFunction · 0.85
get_repl_stateMethod · 0.85

Calls 3

get_lua_state_value_nodeFunction · 0.85
lua_mallocFunction · 0.85
set_lua_state_valueFunction · 0.85

Tested by

no test coverage detected