MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / lua_isinteger

Function lua_isinteger

CodeFormatLib/src/LuaJIT-Compact.cpp:4–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3#ifdef LUAJIT
4int lua_isinteger(lua_State *L, int idx) {
5 if (lua_type(L, idx) == LUA_TNUMBER)
6 {
7 lua_Number n = lua_tonumber(L, idx);
8 return n == (lua_Integer)n;
9 }
10 return 0;
11}
12
13int luaL_len(lua_State *L, int idx) {
14 return lua_objlen(L, idx);

Callers 4

luaToStringFunction · 0.70
range_formatFunction · 0.70
type_formatFunction · 0.70
update_configFunction · 0.70

Calls 1

lua_typeFunction · 0.85

Tested by

no test coverage detected