| 245 | |
| 246 | |
| 247 | static int numusehash (const Table *t, int *nums, int *pnasize) { |
| 248 | int totaluse = 0; /* total number of elements */ |
| 249 | int ause = 0; /* summation of `nums' */ |
| 250 | int i = sizenode(t); |
| 251 | while (i--) { |
| 252 | Node *n = &t->node[i]; |
| 253 | if (!ttisnil(gval(n))) { |
| 254 | ause += countint(key2tval(n), nums); |
| 255 | totaluse++; |
| 256 | } |
| 257 | } |
| 258 | *pnasize += ause; |
| 259 | return totaluse; |
| 260 | } |
| 261 | |
| 262 | |
| 263 | static void setarrayvector (lua_State *L, Table *t, int size) { |