MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / clearkey

Function clearkey

third-party/lua-5.4.6/src/lgc.c:171–175  ·  view source on GitHub ↗

** Clear keys for empty entries in tables. If entry is empty, mark its ** entry as dead. This allows the collection of the key, but keeps its ** entry in the table: its removal could break a chain and could break ** a table traversal. Other places never manipulate dead keys, because ** its associated empty value is enough to signal that the entry is ** logically empty. */

Source from the content-addressed store, hash-verified

169** logically empty.
170*/
171static void clearkey (Node *n) {
172 lua_assert(isempty(gval(n)));
173 if (keyiscollectable(n))
174 setdeadkey(n); /* unused key; remove it */
175}
176
177
178/*

Callers 5

traverseweakvalueFunction · 0.70
traverseephemeronFunction · 0.70
traversestrongtableFunction · 0.70
clearbykeysFunction · 0.70
clearbyvaluesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected