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