| 333 | |
| 334 | |
| 335 | LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *isnum) { |
| 336 | TValue n; |
| 337 | const TValue *o = index2addr(L, idx); |
| 338 | if (tonumber(o, &n)) { |
| 339 | if (isnum) *isnum = 1; |
| 340 | return nvalue(o); |
| 341 | } |
| 342 | else { |
| 343 | if (isnum) *isnum = 0; |
| 344 | return 0; |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | |
| 349 | LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *isnum) { |
no test coverage detected