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

Function TMap_Length

Plugins/UnLua/Source/UnLua/Private/BaseLib/LuaLib_Map.cpp:112–123  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

110 * @see FLuaMap::Num(...)
111 */
112static int32 TMap_Length(lua_State* L)
113{
114 int32 NumParams = lua_gettop(L);
115 if (NumParams != 1)
116 return luaL_error(L, "invalid parameters");
117
118 FLuaMap* Map = (FLuaMap*)(GetCppInstanceFast(L, 1));
119 TMap_Guard(L, Map);
120
121 lua_pushinteger(L, Map->Num());
122 return 1;
123}
124
125/**
126 * @see FLuaMap::Add(...)

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected