/* * 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> /// <author>Reinhard Ostermeier</author> public int SetDebugHook(EventMasks mask, int count) { if (hookCallback.IsNull()) { hookCallback = new LuaCore.lua_Hook(DebugHookCallback); return(LuaCore.lua_sethook(luaState, hookCallback, (int)mask, count)); } return(-1); }
/// <summary> /// Removes the debug hook /// </summary> /// <returns>see lua docs</returns> /// <author>Reinhard Ostermeier</author> public int RemoveDebugHook () { hookCallback = null; return LuaCore.lua_sethook (luaState, null, 0, 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> /// <author>Reinhard Ostermeier</author> public int SetDebugHook (EventMasks mask, int count) { if (hookCallback.IsNull ()) { hookCallback = new LuaCore.lua_Hook (Lua.DebugHookCallback); return LuaCore.lua_sethook (luaState, hookCallback, (int)mask, count); } return -1; }
/// <summary> /// Removes the debug hook /// </summary> /// <returns>see lua docs</returns> /// <author>Reinhard Ostermeier</author> public int RemoveDebugHook() { hookCallback = null; return(LuaCore.lua_sethook(luaState, null, 0, 0)); }