| 354 | |
| 355 | |
| 356 | LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *pisnum) { |
| 357 | lua_Integer res; |
| 358 | const TValue *o = index2addr(L, idx); |
| 359 | int isnum = tointeger(o, &res); |
| 360 | if (!isnum) |
| 361 | res = 0; /* call to 'tointeger' may change 'n' even if it fails */ |
| 362 | if (pisnum) *pisnum = isnum; |
| 363 | return res; |
| 364 | } |
| 365 | |
| 366 | |
| 367 | LUA_API int lua_toboolean (lua_State *L, int idx) { |
no test coverage detected