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

Function reinsert

lib/lua/src/ltable.c:508–521  ·  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

506** (Re)insert all elements from the hash part of 'ot' into table 't'.
507*/
508static void reinsert (lua_State *L, Table *ot, Table *t) {
509 int j;
510 int size = sizenode(ot);
511 for (j = 0; j < size; j++) {
512 Node *old = gnode(ot, j);
513 if (!isempty(gval(old))) {
514 /* doesn't need barrier/invalidate cache, as entry was
515 already present in the table */
516 TValue k;
517 getnodekey(L, &k, old);
518 luaH_set(L, t, &k, gval(old));
519 }
520 }
521}
522
523
524/*

Callers 1

luaH_resizeFunction · 0.85

Calls 1

luaH_setFunction · 0.85

Tested by

no test coverage detected