| 341 | |
| 342 | |
| 343 | LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *pisnum) { |
| 344 | lua_Number n; |
| 345 | const TValue *o = index2addr(L, idx); |
| 346 | int isnum = tonumber(o, &n); |
| 347 | if (!isnum) |
| 348 | n = 0; /* call to 'tonumber' may change 'n' even if it fails */ |
| 349 | if (pisnum) *pisnum = isnum; |
| 350 | return n; |
| 351 | } |
| 352 | |
| 353 | |
| 354 | LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *pisnum) { |
nothing calls this directly
no test coverage detected