From: John L. <jr...@us...> - 2006-05-13 21:05:39
|
Update of /cvsroot/wxlua/wxLua/modules/lua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29246/wxLua/modules/lua/src Modified Files: Makefile lstate.c Log Message: use #define WXLUA_LUA_NEWTHREAD for thread handler code, was WXLUA_CODE define add luamodule "app" which generates a library for using wxLua as a module in lua Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 30 Mar 2006 02:48:40 -0000 1.3 --- Makefile 13 May 2006 21:05:36 -0000 1.4 *************** *** 5,13 **** # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= # Your platform. See PLATS for possible values. PLAT= none CC= gcc ! CFLAGS= -O2 -Wall $(MYCFLAGS) AR= ar rcu RANLIB= ranlib --- 5,16 ---- # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= + # allow interception of coroutine created lua_States + WXLUACFLAGS = -DWXLUA_LUA_NEWTHREAD + # Your platform. See PLATS for possible values. PLAT= none CC= gcc ! CFLAGS= -O2 -Wall $(MYCFLAGS) $(WXLUACFLAGS) AR= ar rcu RANLIB= ranlib Index: lstate.c =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/lstate.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lstate.c 2 May 2006 22:46:53 -0000 1.3 --- lstate.c 13 May 2006 21:05:36 -0000 1.4 *************** *** 116,121 **** } ! #define WXLUA_CODE /* wxlua - always define this since if not set it does nothing */ ! #ifndef WXLUA_CODE lua_State *luaE_newthread (lua_State *L) { lua_State *L1 = tostate(luaM_malloc(L, state_size(lua_State))); --- 116,120 ---- } ! #ifndef WXLUA_LUA_NEWTHREAD lua_State *luaE_newthread (lua_State *L) { lua_State *L1 = tostate(luaM_malloc(L, state_size(lua_State))); *************** *** 140,144 **** luaM_freemem(L, fromstate(L1), state_size(lua_State)); } ! #else // !WXLUA_CODE /* wxlua - track child threads see wxLuaState */ //#include <luathread.h> --- 139,143 ---- luaM_freemem(L, fromstate(L1), state_size(lua_State)); } ! #else // WXLUA_LUA_NEWTHREAD is defined /* wxlua - track child threads see wxLuaState */ //#include <luathread.h> *************** *** 194,198 **** luaM_freemem(L, fromstate(L1), state_size(lua_State)); } ! #endif // WXLUA_CODE --- 193,197 ---- luaM_freemem(L, fromstate(L1), state_size(lua_State)); } ! #endif // WXLUA_LUA_NEWTHREAD |