MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / traversestrongtable

Function traversestrongtable

lib/lua/src/lgc.c:523–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521
522
523static void traversestrongtable (global_State *g, Table *h) {
524 Node *n, *limit = gnodelast(h);
525 unsigned int i;
526 unsigned int asize = luaH_realasize(h);
527 for (i = 0; i < asize; i++) /* traverse array part */
528 markvalue(g, &h->array[i]);
529 for (n = gnode(h, 0); n < limit; n++) { /* traverse hash part */
530 if (isempty(gval(n))) /* entry is empty? */
531 clearkey(n); /* clear its key */
532 else {
533 lua_assert(!keyisnil(n));
534 markkey(g, n);
535 markvalue(g, gval(n));
536 }
537 }
538 genlink(g, obj2gco(h));
539}
540
541
542static lu_mem traversetable (global_State *g, Table *h) {

Callers 1

traversetableFunction · 0.85

Calls 3

luaH_realasizeFunction · 0.85
clearkeyFunction · 0.85
genlinkFunction · 0.85

Tested by

no test coverage detected