| 723 | |
| 724 | |
| 725 | LUALIB_API int luaL_len (lua_State *L, int idx) { |
| 726 | int l; |
| 727 | int isnum; |
| 728 | lua_len(L, idx); |
| 729 | l = (int)lua_tointegerx(L, -1, &isnum); |
| 730 | if (!isnum) |
| 731 | luaL_error(L, "object length is not a number"); |
| 732 | lua_pop(L, 1); /* remove object */ |
| 733 | return l; |
| 734 | } |
| 735 | |
| 736 | |
| 737 | LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) { |
no test coverage detected