From 8811b94663391afe87eb4a88b459400647b47d2c Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 27 May 2007 13:19:29 +0000 Subject: Fixing thread saving system. --- lib/BLua.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/BLua.cc b/lib/BLua.cc index b7df7eb..8d89802 100644 --- a/lib/BLua.cc +++ b/lib/BLua.cc @@ -17,12 +17,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: BLua.cc,v 1.42 2007-05-23 13:04:07 pixel Exp $ */ +/* $Id: BLua.cc,v 1.43 2007-05-27 13:19:29 pixel Exp $ */ #include #include "BLua.h" #include "Buffer.h" #include +#include #ifndef BUFFERSIZE #define BUFFERSIZE 2048 @@ -962,17 +963,15 @@ void Lua::dumpvars_r(Handle * h, int i, int depth) throw (GeneralException) { Lua * Lua::thread(bool saveit) { lua_State * L1 = lua_newthread(L); Lua * Lt = find(L1); -#if 0 if (saveit) { push("BLUA_THREADS"); // -2 = thread, -1 = "BLUA_THREADS" copy(); // -3 = thread, -2 = "BLUA_THREADS", -1 = "BLUA_THREADS" gettable(LUA_REGISTRYINDEX); // -3 = thread, -2 = "BLUA_THREADS", -1 = BLUA_THREADS - push((lua_Number) (int) (void *) Lt); // -4 = thread, -3 = "BLUA_THREADS", -2 = BLUA_THREADS, -1 = key-Lt + push((lua_Number) IntPoint(Lt)); // -4 = thread, -3 = "BLUA_THREADS", -2 = BLUA_THREADS, -1 = key-Lt copy(-4); // -5 = thread, -4 = "BLUA_THREADS", -3 = BLUA_THREADS, -2 = key-Lt, -1 = thread settable(); // -3 = thread, -2 = "BLUA_THREADS", -1 = BLUA_THREADS settable(LUA_REGISTRYINDEX); // -1 = thread } -#endif return Lt; } -- cgit v1.2.3