| 579 | |
| 580 | |
| 581 | LUALIB_API int luaL_len (lua_State *L, int idx) { |
| 582 | int l; |
| 583 | int isnum; |
| 584 | lua_len(L, idx); |
| 585 | l = (int)lua_tointegerx(L, -1, &isnum); |
| 586 | if (!isnum) |
| 587 | luaL_error(L, "object length is not a number"); |
| 588 | lua_pop(L, 1); /* remove object */ |
| 589 | return l; |
| 590 | } |
| 591 | |
| 592 | |
| 593 | LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) { |
no test coverage detected