** (Re)insert all elements from the hash part of 'ot' into table 't'. */
| 506 | ** (Re)insert all elements from the hash part of 'ot' into table 't'. |
| 507 | */ |
| 508 | static 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 | /* |
no test coverage detected