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

Function clearkey

extlibs/lua/src/lgc.c:159–163  ·  view source on GitHub ↗

** Clear keys for empty entries in tables. If entry is empty ** and its key is not marked, 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). The main feature of a dead key is that it must ** be different from any other value, to do not disturb searches. ** Other places never manipulate dead keys, because its ass

Source from the content-addressed store, hash-verified

157** value is enough to signal that the entry is logically empty.
158*/
159static void clearkey (Node *n) {
160 lua_assert(isempty(gval(n)));
161 if (keyiswhite(n))
162 setdeadkey(n); /* unused and unmarked key; remove it */
163}
164
165
166/*

Callers 5

traverseweakvalueFunction · 0.85
traverseephemeronFunction · 0.85
traversestrongtableFunction · 0.85
clearbykeysFunction · 0.85
clearbyvaluesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected