MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / clear

Function clear

extlibs/sol3/include/sol/sol.hpp:10063–10075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10061 }
10062
10063 inline void clear(lua_State* L, int table_index) {
10064 lua_pushnil(L);
10065 while (lua_next(L, table_index) != 0) {
10066 // remove value
10067 lua_pop(L, 1);
10068 // duplicate key to protect form rawset
10069 lua_pushvalue(L, -1);
10070 // push new value
10071 lua_pushnil(L);
10072 // table_index%[key] = nil
10073 lua_rawset(L, table_index);
10074 }
10075 }
10076
10077 inline void clear(reference& r) {
10078 auto pp = push_pop<false>(r);

Callers 6

~darrayMethod · 0.85
~MonotoneMethod · 0.85
loadFileMethod · 0.85
real_clear_traitsMethod · 0.85
clearMethod · 0.85
clearMethod · 0.85

Calls 7

lua_pushnilFunction · 0.85
lua_nextFunction · 0.85
lua_pushvalueFunction · 0.85
lua_rawsetFunction · 0.85
index_ofMethod · 0.45
lua_stateMethod · 0.45
stack_indexMethod · 0.45

Tested by

no test coverage detected