MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaL_checknumber

Function luaL_checknumber

lua/lauxlib.c:213–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211
212
213LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) {
214 if (lua_isnumber(L, narg))
215 return lua_tonumber(L, narg);
216 if (luabb_isnumber(L, narg))
217 return luabb_tonumber(L, narg);
218 tag_error(L, narg, LUA_TNUMBER);
219 return 3.14; /* can't reach */
220}
221
222
223LUALIB_API lua_Number luaL_optnumber (lua_State *L, int narg, lua_Number def) {

Callers 15

math_absFunction · 0.85
math_sinFunction · 0.85
math_sinhFunction · 0.85
math_cosFunction · 0.85
math_coshFunction · 0.85
math_tanFunction · 0.85
math_tanhFunction · 0.85
math_asinFunction · 0.85
math_acosFunction · 0.85
math_atanFunction · 0.85
math_atan2Function · 0.85
math_ceilFunction · 0.85

Calls 5

lua_isnumberFunction · 0.85
lua_tonumberFunction · 0.85
luabb_isnumberFunction · 0.85
luabb_tonumberFunction · 0.85
tag_errorFunction · 0.85

Tested by

no test coverage detected