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

Function lua_isinteger

extlibs/sol3/include/sol/sol.hpp:3087–3095  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3085}
3086
3087COMPAT53_API int lua_isinteger(lua_State *L, int index) {
3088 if (lua_type(L, index) == LUA_TNUMBER) {
3089 lua_Number n = lua_tonumber(L, index);
3090 lua_Integer i = lua_tointeger(L, index);
3091 if (i == n)
3092 return 1;
3093 }
3094 return 0;
3095}
3096
3097COMPAT53_API lua_Integer lua_tointegerx(lua_State *L, int i, int *isnum) {
3098 int ok = 0;

Callers 3

checkMethod · 0.70
getMethod · 0.70
get_usingMethod · 0.70

Calls 1

lua_typeFunction · 0.85

Tested by

no test coverage detected