MCPcopy Create free account
hub / github.com/Segs/Segs / lua_isinteger

Function lua_isinteger

3rd_party/lua_sol2/include/sol.hpp:3019–3027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3017}
3018
3019COMPAT53_API int lua_isinteger(lua_State *L, int index) {
3020 if (lua_type(L, index) == LUA_TNUMBER) {
3021 lua_Number n = lua_tonumber(L, index);
3022 lua_Integer i = lua_tointeger(L, index);
3023 if (i == n)
3024 return 1;
3025 }
3026 return 0;
3027}
3028
3029COMPAT53_API lua_Integer lua_tointegerx(lua_State *L, int i, int *isnum) {
3030 int ok = 0;

Callers 3

checkMethod · 0.85
getMethod · 0.85
getMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected