示例#1
0
        public static void lua_sethook(lua_State L, KyHookFunction hookFunction, LuaHookMask mask, int count)
        {
#if SAVE_FUNC
            savedFn.TryAdd(hookFunction);
#endif
            lua_sethook(L, hookFunction.ToFunctionPointer(), (int)mask, count);
        }
示例#2
0
        /*
         * Lets go of a previously allocated reference to a table, function
         * or userdata
         */
        #region lua debug functions
        /// <summary>
        /// Activates the debug hook
        /// </summary>
        /// <param name = "mask">Mask</param>
        /// <param name = "count">Count</param>
        /// <returns>see lua docs. -1 if hook is already set</returns>
        public int SetDebugHook(LuaHookMask mask, int count)
        {
            if (hookCallback == null)
            {
                hookCallback = new LuaHookFunction(Lua.DebugHookCallback);
                luaState.SetHook(hookCallback, mask, count);
            }

            return(-1);
        }
示例#3
0
        public int SetDebugHook(LuaHookMask mask, int count)
        {
            if (_hookCallback == null)
            {
                _hookCallback = DebugHookCallback;
                lua_sethook(L, _hookCallback, mask, count);
            }

            return(-1);
        }
示例#4
0
        /*
         * Lets go of a previously allocated reference to a table, function
         * or userdata
         */
        #region lua debug functions
        /// <summary>
        /// Activates the debug hook
        /// </summary>
        /// <param name = "mask">Mask</param>
        /// <param name = "count">Count</param>
        /// <returns>see lua docs. -1 if hook is already set</returns>
        public int SetDebugHook(LuaHookMask mask, int count)
        {
            if (_hookCallback == null)
            {
                _hookCallback = DebugHookCallback;
                _luaState.SetHook(_hookCallback, mask, count);
            }

            return(-1);
        }
示例#5
0
文件: LuaState.cs 项目: ygrenier/LuaN
 /// <summary>
 /// Sets the debugging hook function. 
 /// </summary>
 public void SetHook(LuaHook func, LuaHookMask mask, int count)
 {
     throw new NotImplementedException();
 }