| 199 | |
| 200 | |
| 201 | LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) { |
| 202 | lua_Number d = lua_tonumber(L, narg); |
| 203 | if (d == 0 && !lua_isnumber(L, narg)) /* avoid extra test when d is not 0 */ |
| 204 | tag_error(L, narg, LUA_TNUMBER); |
| 205 | return d; |
| 206 | } |
| 207 | |
| 208 | |
| 209 | LUALIB_API lua_Number luaL_optnumber (lua_State *L, int narg, lua_Number def) { |
nothing calls this directly
no test coverage detected