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

Function TSet_Length

Plugins/UnLua/Source/UnLua/Private/BaseLib/LuaLib_Set.cpp:48–59  ·  view source on GitHub ↗

* @see FLuaSet::Num(...) */

Source from the content-addressed store, hash-verified

46 * @see FLuaSet::Num(...)
47 */
48static int32 TSet_Length(lua_State* L)
49{
50 int32 NumParams = lua_gettop(L);
51 if (NumParams != 1)
52 return luaL_error(L, "invalid parameters");
53
54 FLuaSet* Set = (FLuaSet*)(GetCppInstanceFast(L, 1));
55 TSet_Guard(L, Set);
56
57 lua_pushinteger(L, Set->Num());
58 return 1;
59}
60
61/**
62 * @see FLuaSet::Add(...)

Callers

nothing calls this directly

Calls 6

lua_gettopFunction · 0.85
luaL_errorFunction · 0.85
GetCppInstanceFastFunction · 0.85
TSet_GuardFunction · 0.85
lua_pushintegerFunction · 0.85
NumMethod · 0.45

Tested by

no test coverage detected