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

Function luaL_checkinteger

lua/lauxlib.c:228–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226
227
228LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int narg) {
229 lua_Integer d = lua_tointeger(L, narg);
230 if (d == 0 && !lua_isnumber(L, narg)) /* avoid extra test when d is not 0 */
231 /* COMDB2 MODIFICATION */
232 {
233 if (luabb_isnumber(L, narg) && !luabb_isnull(L, narg)) {
234 long long i;
235 luabb_tointeger(L, narg, &i);
236 d = i;
237 } else
238 /* COMDB2 MODIFICATION */
239 tag_error(L, narg, LUA_TNUMBER);
240 }
241 return d;
242}
243
244
245LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int narg,

Callers 1

str_subFunction · 0.85

Calls 6

lua_tointegerFunction · 0.85
lua_isnumberFunction · 0.85
luabb_isnumberFunction · 0.85
luabb_isnullFunction · 0.85
luabb_tointegerFunction · 0.85
tag_errorFunction · 0.85

Tested by

no test coverage detected