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

Function TArray_Length

Plugins/UnLua/Source/UnLua/Private/BaseLib/LuaLib_Array.cpp:99–110  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

97 * @see FLuaArray::Num(...)
98 */
99static int32 TArray_Length(lua_State* L)
100{
101 int32 NumParams = lua_gettop(L);
102 if (NumParams != 1)
103 return luaL_error(L, "invalid parameters");
104
105 FLuaArray* Array = (FLuaArray*)(GetCppInstanceFast(L, 1));
106 TArray_Guard(L, Array);
107
108 lua_pushinteger(L, Array->Num());
109 return 1;
110}
111
112/**
113 * @see FLuaArray::Add(...)

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected