MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / lua_Number luaL_checknumber

Function lua_Number luaL_checknumber

other_src/lua/src/lauxlib.cpp:201–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199
200
201LUALIB_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
209LUALIB_API lua_Number luaL_optnumber (lua_State *L, int narg, lua_Number def) {

Callers

nothing calls this directly

Calls 3

lua_tonumberFunction · 0.85
lua_isnumberFunction · 0.70
tag_errorFunction · 0.70

Tested by

no test coverage detected