| 279 | |
| 280 | |
| 281 | static int numusehash (const Table *t, int *nums, int *pnasize) { |
| 282 | int totaluse = 0; /* total number of elements */ |
| 283 | int ause = 0; /* summation of `nums' */ |
| 284 | int i = sizenode(t); |
| 285 | while (i--) { |
| 286 | Node *n = &t->node[i]; |
| 287 | if (!ttisnil(gval(n))) { |
| 288 | ause += countint(key2tval(n), nums); |
| 289 | totaluse++; |
| 290 | } |
| 291 | } |
| 292 | *pnasize += ause; |
| 293 | return totaluse; |
| 294 | } |
| 295 | |
| 296 | |
| 297 | static void setarrayvector (lua_State *L, Table *t, int size) { |