| 9485 | |
| 9486 | |
| 9487 | static int numusehash (const Table *t, int *nums, int *pnasize) { |
| 9488 | int totaluse = 0; /* total number of elements */ |
| 9489 | int ause = 0; /* summation of `nums' */ |
| 9490 | int i = sizenode(t); |
| 9491 | while (i--) { |
| 9492 | Node *n = &t->node[i]; |
| 9493 | if (!ttisnil(gval(n))) { |
| 9494 | ause += countint(key2tval(n), nums); |
| 9495 | totaluse++; |
| 9496 | } |
| 9497 | } |
| 9498 | *pnasize += ause; |
| 9499 | return totaluse; |
| 9500 | } |
| 9501 | |
| 9502 | |
| 9503 | static void setarrayvector (lua_State *L, Table *t, int size) { |