MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaL_checkinteger

Function luaL_checkinteger

Source/Misc/lua/src/lua.c:10401–10406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10399
10400
10401LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int narg) {
10402lua_Integer d = lua_tointeger(L, narg);
10403if (d == 0 && !lua_isnumber(L, narg)) /* avoid extra test when d is not 0 */
10404tag_error(L, narg, LUA_TNUMBER);
10405return d;
10406}
10407
10408
10409LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int narg,

Callers 1

str_subFunction · 0.85

Calls 3

lua_tointegerFunction · 0.85
lua_isnumberFunction · 0.85
tag_errorFunction · 0.85

Tested by

no test coverage detected