MCPcopy Create free account
hub / github.com/Tencent/xLua / getLuaTable

Method getLuaTable

Assets/XLua/Src/ObjectCasters.cs:393–406  ·  view source on GitHub ↗
(RealStatePtr L, int idx, object target)

Source from the content-addressed store, hash-verified

391 }
392
393 private object getLuaTable(RealStatePtr L, int idx, object target)
394 {
395 if (LuaAPI.lua_type(L, idx) == LuaTypes.LUA_TUSERDATA)
396 {
397 object obj = translator.SafeGetCSObj(L, idx);
398 return (obj != null && obj is LuaTable) ? obj : null;
399 }
400 if (!LuaAPI.lua_istable(L, idx))
401 {
402 return null;
403 }
404 LuaAPI.lua_pushvalue(L, idx);
405 return new LuaTable(LuaAPI.luaL_ref(L), translator.luaEnv);
406 }
407
408 private object getLuaFunction(RealStatePtr L, int idx, object target)
409 {

Callers

nothing calls this directly

Calls 5

lua_typeMethod · 0.80
SafeGetCSObjMethod · 0.80
lua_istableMethod · 0.80
lua_pushvalueMethod · 0.80
luaL_refMethod · 0.80

Tested by

no test coverage detected