Example #1
0
        public void SetBack(IntPtr ptr, int p, object o)
        {
            int index = LuaNativeMethods.luaS_rawnetobj(ptr, p);

            if (index != -1)
            {
                cache.Set(index, o);
            }
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }