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