Beispiel #1
0
        public GCHandle PushCSharpClosure(CSharpFunctionDelegate f, int n)
        {
            GCHandle handle = GCHandle.Alloc(f);
            IntPtr   p      = GCHandle.ToIntPtr(handle);

            LuaAPI.lua_pushlightuserdata(this.m_lua, p);
            LuaAPI.lua_insert(this.m_lua, -(n + 1));
            LuaAPI.lua_pushcclosure(this.m_lua, this.m_pfnDispatch, n + 1);
            return(handle);
        }
Beispiel #2
0
 public void Insert(int index)
 {
     LuaAPI.lua_insert(this.m_lua, index);
 }