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); }
/* * 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); }
public int SetDebugHook(LuaHookMask mask, int count) { if (_hookCallback == null) { _hookCallback = DebugHookCallback; lua_sethook(L, _hookCallback, mask, count); } return(-1); }
/* * 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); }
/// <summary> /// Sets the debugging hook function. /// </summary> public void SetHook(LuaHook func, LuaHookMask mask, int count) { throw new NotImplementedException(); }