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

Function TArray_Index

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

Source from the content-addressed store, hash-verified

543}
544
545static int32 TArray_Index(lua_State* L)
546{
547 if (lua_isinteger(L, 2))
548 {
549 return TArray_Get(L);
550 }
551
552 lua_getmetatable(L, 1);
553 if (lua_compare(L, 1, -1, LUA_OPEQ))
554 lua_pushnil(L);
555 else
556 lua_getfield(L, -1, lua_tostring(L, 2));
557 lua_remove(L, -2);
558
559 return 1;
560}
561
562static int32 TArray_NewIndex(lua_State* L)
563{

Callers

nothing calls this directly

Calls 6

lua_isintegerFunction · 0.85
TArray_GetFunction · 0.85
lua_getmetatableFunction · 0.85
lua_compareFunction · 0.85
lua_pushnilFunction · 0.85
lua_getfieldFunction · 0.85

Tested by

no test coverage detected