MCPcopy Create free account
hub / github.com/ThePhD/sol2 / clear_entries

Function clear_entries

include/sol/stack.hpp:76–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 }
75
76 inline void clear_entries(stack_reference r) {
77 stack::push(r.lua_state(), lua_nil);
78 while (lua_next(r.lua_state(), -2)) {
79 absolute_index key(r.lua_state(), -2);
80 auto pn = stack::pop_n(r.lua_state(), 1);
81 stack::set_field<false, true>(r.lua_state(), key, lua_nil, r.stack_index());
82 }
83 }
84
85 inline void clear_entries(const reference& registry_reference) {
86 auto pp = stack::push_pop(registry_reference);

Callers

nothing calls this directly

Calls 5

pushFunction · 0.85
pop_nFunction · 0.85
push_popFunction · 0.85
lua_stateMethod · 0.45
stack_indexMethod · 0.45

Tested by

no test coverage detected