MCPcopy Create free account
hub / github.com/Tencent/UnLua / lua_tointegerx

Function lua_tointegerx

Plugins/UnLuaExtensions/LuaProtobuf/Source/src/pb.cpp:59–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57#define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l))
58
59static lua_Integer lua_tointegerx(lua_State *L, int idx, int *isint) {
60 lua_Integer i = lua_tointeger(L, idx);
61 if (isint) *isint = (i != 0 || lua_type(L, idx) == LUA_TNUMBER);
62 return i;
63}
64
65static lua_Number lua_tonumberx(lua_State *L, int idx, int *isnum) {
66 lua_Number i = lua_tonumber(L, idx);

Callers 2

lpb_tointegerxFunction · 0.70
lpb_fieldFunction · 0.70

Calls 1

lua_typeFunction · 0.85

Tested by

no test coverage detected