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

Function reinsert

extlibs/lua/src/ltable.c:464–477  ·  view source on GitHub ↗

** (Re)insert all elements from the hash part of 'ot' into table 't'. */

Source from the content-addressed store, hash-verified

462** (Re)insert all elements from the hash part of 'ot' into table 't'.
463*/
464static void reinsert (lua_State *L, Table *ot, Table *t) {
465 int j;
466 int size = sizenode(ot);
467 for (j = 0; j < size; j++) {
468 Node *old = gnode(ot, j);
469 if (!isempty(gval(old))) {
470 /* doesn't need barrier/invalidate cache, as entry was
471 already present in the table */
472 TValue k;
473 getnodekey(L, &k, old);
474 setobjt2t(L, luaH_set(L, t, &k), gval(old));
475 }
476 }
477}
478
479
480/*

Callers 1

luaH_resizeFunction · 0.85

Calls 1

luaH_setFunction · 0.85

Tested by

no test coverage detected