** Push on the stack the contents of table 'arg' from 1 to #arg */
| 436 | ** Push on the stack the contents of table 'arg' from 1 to #arg |
| 437 | */ |
| 438 | static int pushargs(lua_State *L) { |
| 439 | int i, n; |
| 440 | if (lua_getglobal(L, "arg") != LUA_TTABLE) |
| 441 | luaL_error(L, "'arg' is not a table"); |
| 442 | n = (int)luaL_len(L, -1); |
| 443 | luaL_checkstack(L, n + 3, "too many arguments to script"); |
| 444 | for (i = 1; i <= n; i++) |
| 445 | lua_rawgeti(L, -i, i); |
| 446 | lua_remove(L, -i); /* remove table from the stack */ |
| 447 | return n; |
| 448 | } |
| 449 | |
| 450 | static bool use_type_check_compile = true; |
| 451 |
no test coverage detected