public void SetBack(IntPtr ptr, int p, object o) { int index = LuaNativeMethods.luaS_rawnetobj(ptr, p); if (index != -1) { cache.Set(index, o); } }
public object Get(IntPtr ptr, int p) { int index = LuaNativeMethods.luaS_rawnetobj(ptr, p); object o; if (index != -1 && cache.Get(index, out o)) { return(o); } return(null); }
public static int LuaGC(IntPtr ptr) { int index = LuaNativeMethods.luaS_rawnetobj(ptr, 1); if (index > 0) { ObjectCache t = ObjectCache.Get(ptr); t.GC(index); } return(0); }