You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: John L. <jr...@us...> - 2006-12-06 06:58:28
|
Update of /cvsroot/wxlua/wxLua/modules In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21762/wxLua/modules Modified Files: Makefile.in Log Message: removed WXLUA_USE_NEWTHREAD_HANDLER and friends by replacing luaE_newthread, luaE_freethread we now look up coroutine wxLuaStateData by using a light user data pushed into the lua registry table the lua is now an unmodified copy of lua with no mods necessary Index: Makefile.in =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/Makefile.in,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Makefile.in 15 Sep 2006 16:24:35 -0000 1.45 --- Makefile.in 6 Dec 2006 06:58:22 -0000 1.46 *************** *** 812,816 **** @COND_SHARED_0@install_verbatimlua_lib_headers: @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir) ! @COND_SHARED_0@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h lua/include/luathread.h; do \ @COND_SHARED_0@ if test ! -d $(DESTDIR)$(includedir)/`dirname $$f` ; then \ @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ --- 812,816 ---- @COND_SHARED_0@install_verbatimlua_lib_headers: @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir) ! @COND_SHARED_0@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h; do \ @COND_SHARED_0@ if test ! -d $(DESTDIR)$(includedir)/`dirname $$f` ; then \ @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ *************** *** 820,824 **** @COND_SHARED_0@uninstall_verbatimlua_lib_headers: ! @COND_SHARED_0@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h lua/include/luathread.h; do \ @COND_SHARED_0@ rm -f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0@ done --- 820,824 ---- @COND_SHARED_0@uninstall_verbatimlua_lib_headers: ! @COND_SHARED_0@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h; do \ @COND_SHARED_0@ rm -f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0@ done *************** *** 841,845 **** @COND_SHARED_1@install_verbatimlua_dll_headers: @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir) ! @COND_SHARED_1@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h lua/include/luathread.h; do \ @COND_SHARED_1@ if test ! -d $(DESTDIR)$(includedir)/`dirname $$f` ; then \ @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ --- 841,845 ---- @COND_SHARED_1@install_verbatimlua_dll_headers: @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir) ! @COND_SHARED_1@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h; do \ @COND_SHARED_1@ if test ! -d $(DESTDIR)$(includedir)/`dirname $$f` ; then \ @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ *************** *** 849,853 **** @COND_SHARED_1@uninstall_verbatimlua_dll_headers: ! @COND_SHARED_1@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h lua/include/luathread.h; do \ @COND_SHARED_1@ rm -f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1@ done --- 849,853 ---- @COND_SHARED_1@uninstall_verbatimlua_dll_headers: ! @COND_SHARED_1@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h; do \ @COND_SHARED_1@ rm -f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1@ done *************** *** 867,871 **** @COND_SHARED_0@install_lua_lib_headers: @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir) ! @COND_SHARED_0@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h lua/include/luathread.h; do \ @COND_SHARED_0@ if test ! -d $(DESTDIR)$(includedir)/`dirname $$f` ; then \ @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ --- 867,871 ---- @COND_SHARED_0@install_lua_lib_headers: @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir) ! @COND_SHARED_0@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h; do \ @COND_SHARED_0@ if test ! -d $(DESTDIR)$(includedir)/`dirname $$f` ; then \ @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ *************** *** 875,879 **** @COND_SHARED_0@uninstall_lua_lib_headers: ! @COND_SHARED_0@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h lua/include/luathread.h; do \ @COND_SHARED_0@ rm -f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0@ done --- 875,879 ---- @COND_SHARED_0@uninstall_lua_lib_headers: ! @COND_SHARED_0@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h; do \ @COND_SHARED_0@ rm -f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0@ done *************** *** 896,900 **** @COND_SHARED_1@install_lua_dll_headers: @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir) ! @COND_SHARED_1@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h lua/include/luathread.h; do \ @COND_SHARED_1@ if test ! -d $(DESTDIR)$(includedir)/`dirname $$f` ; then \ @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ --- 896,900 ---- @COND_SHARED_1@install_lua_dll_headers: @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir) ! @COND_SHARED_1@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h; do \ @COND_SHARED_1@ if test ! -d $(DESTDIR)$(includedir)/`dirname $$f` ; then \ @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ *************** *** 904,908 **** @COND_SHARED_1@uninstall_lua_dll_headers: ! @COND_SHARED_1@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h lua/include/luathread.h; do \ @COND_SHARED_1@ rm -f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1@ done --- 904,908 ---- @COND_SHARED_1@uninstall_lua_dll_headers: ! @COND_SHARED_1@ for f in lua/include/luaconf.h lua/include/lua.h lua/include/lauxlib.h lua/include/lualib.h; do \ @COND_SHARED_1@ rm -f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1@ done |
From: John L. <jr...@us...> - 2006-12-06 06:58:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21762/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: removed WXLUA_USE_NEWTHREAD_HANDLER and friends by replacing luaE_newthread, luaE_freethread we now look up coroutine wxLuaStateData by using a light user data pushed into the lua registry table the lua is now an unmodified copy of lua with no mods necessary Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** wxlstate.cpp 1 Dec 2006 06:25:47 -0000 1.78 --- wxlstate.cpp 6 Dec 2006 06:58:23 -0000 1.79 *************** *** 44,47 **** --- 44,52 ---- #include "wx/tokenzr.h" + extern "C" + { + #include "lua/src/lstate.h" + } + extern int wxLuaEventListCompareFn(const void *p1, const void *p2); // wxlbind.cpp extern int wxLuaClassListCompareByTag(const void *p1, const void *p2); // wxlbind.cpp *************** *** 76,157 **** // ---------------------------------------------------------------------------- - // WXLUA_LUA_NEWTHREAD - make sure that coroutines lua_State's are tracked - // ---------------------------------------------------------------------------- - - // add lua_States created from lua's coroutines - extern "C" - { - #ifdef WXLUA_LUA_NEWTHREAD - // See lua/src/lstate.c for added hook into luaE_newthread() - #include "lua/include/luathread.h" - #endif //WXLUA_LUA_NEWTHREAD - } - - #ifdef WXLUA_LUA_NEWTHREAD - - // Hook into function calls to luaE_newthread (calls from coroutine.create/wrap) - // and add the new lua_State as a child sharing it's wxLuaStateData - void wxLuaState_newthread_handler(lua_State *L, lua_State *L1) - { - // L is the original lua_State, L1 is the new coroutine thread - wxLuaState wxlState_orig(L); - wxCHECK_RET(wxlState_orig.Ok(), wxT("Invalid wxLuaState")); - - // Create a new wxLuaState for the coroutine and set the wxLuaStateData - // to the original wxLuaState's data - wxLuaState wxlState(L1, WXLUASTATE_COROUTINE); - delete wxlState.GetLuaStateRefData()->m_wxlStateData; - wxlState.GetLuaStateRefData()->m_wxlStateData = wxlState_orig.GetLuaStateRefData()->m_wxlStateData; - wxlState.GetLuaStateRefData()->m_own_stateData = false; - - wxlState_orig.GetLuaStateRefData()->m_coroutineStates.Add(wxlState); - - // put into the hashmap the coroutine's wxLuaStateRefData - wxLuaStateRefData::s_wxHashMapLuaStateRefData[L1] = wxlState.GetLuaStateRefData(); - - //wxPrintf(wxT("wxLuaState_newthread_handler L %d L1 %d, L_wxlsdata %d L1_wxlsdata %d\n"), (long)L, (long)L1, (long)wxlState_orig.GetLuaStateRefData(), (long)wxlState.GetLuaStateRefData()); - - // Stick us into the lua_State - push key, value - //lua_pushstring( L1, "__wxLuaStateRefData" ); - //lua_pushlightuserdata( L1, (void*)wxlState.GetRefData() ); - // set the value - //lua_settable( L1, LUA_REGISTRYINDEX ); - } - - // Hook into function calls to luaE_freethread (calls from coroutine.create/wrap) - // and remove the child lua_State - void wxLuaState_freethread_handler(lua_State *L, lua_State *L1) - { - // L is the original lua_State, L1 is the coroutine thread - wxLuaState wxlState_orig(L); - wxCHECK_RET(wxlState_orig.Ok(), wxT("Invalid wxLuaState")); - wxLuaState wxlState(L1); - wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); - - size_t n, count = wxlState_orig.GetLuaStateRefData()->m_coroutineStates.GetCount(); - for (n = 0; n < count; n++) - { - if (wxlState_orig.GetLuaStateRefData()->m_coroutineStates[n] == wxlState) - { - wxlState_orig.GetLuaStateRefData()->m_coroutineStates.RemoveAt(n); - break; - } - } - - //wxPrintf(wxT("wxLuaInterpreter_freethread_handler lua_State from a thread L=%ld L1=%ld\n"), (long)L, (long)L1); fflush(stdout); - wxLuaStateRefData::s_wxHashMapLuaStateRefData.erase(L1); - } - - static void wxLuaState_SetupThreadHandlers() - { - if (wxLua_lua_getnewthreadhandler() == NULL) - wxLua_lua_setnewthreadhandler( wxLuaState_newthread_handler ); - if (wxLua_lua_getfreethreadhandler() == NULL) - wxLua_lua_setfreethreadhandler( wxLuaState_freethread_handler ); - } - - #endif //WXLUA_LUA_NEWTHREAD - - // ---------------------------------------------------------------------------- // C functions for lua used in wxLuaState // ---------------------------------------------------------------------------- --- 81,84 ---- *************** *** 1054,1067 **** m_lua_State = NULL; m_lua_State_static = false; m_wxlStateData = NULL; ! m_own_stateData = false; } wxLuaStateRefData::wxLuaStateRefData(bool create_data) { - #ifdef WXLUA_LUA_NEWTHREAD - wxLuaState_SetupThreadHandlers(); - #endif //WXLUA_LUA_NEWTHREAD - Init(); if (create_data) --- 981,991 ---- m_lua_State = NULL; m_lua_State_static = false; + m_lua_State_coroutine = false; m_wxlStateData = NULL; ! m_own_stateData = true; } wxLuaStateRefData::wxLuaStateRefData(bool create_data) { Init(); if (create_data) *************** *** 1075,1078 **** --- 999,1003 ---- { wxCHECK_RET((m_lua_State_static == true) || (m_lua_State == NULL), wxT("You must ALWAYS call wxLuaState::Destroy and not wxObject::UnRef")); + CloseLuaState(true); if (m_own_stateData) *************** *** 1085,1088 **** --- 1010,1015 ---- return true; + if (m_lua_State_coroutine) return true; + m_wxlStateData->m_is_closing = true; *************** *** 1195,1198 **** --- 1122,1126 ---- wxLuaStateRefData* wxLuaStateRefData::GetLuaStateRefData(lua_State* L) { + // try our hashtable for faster lookup wxHashMapLuaStateRefData::iterator it = s_wxHashMapLuaStateRefData.find(L); if (it != s_wxHashMapLuaStateRefData.end()) *************** *** 1201,1226 **** return it->second; } ! return NULL; ! /* ! // Get the wxLuaStateRefData from lua itself (doesn't work w/ coroutines) ! int top = lua_gettop( L ); ! // try to get the state ! lua_pushstring( L, "__wxLuaStateRefData" ); ! lua_gettable( L, LUA_REGISTRYINDEX ); - // if nothing was returned or it wasn't a ptr, abort - if ( (top == lua_gettop(L)) || !lua_islightuserdata(L, -1) ) - { lua_settop( L, top ); ! return NULL; } - - // get the pointer, clean the stack, return - wxLuaStateRefData* d = (wxLuaStateRefData*)lua_touserdata( L, -1 ); - lua_settop( L, top ); - return d; - */ } --- 1129,1155 ---- return it->second; } ! else // it's a coroutine? look up the state data from lua ! { ! // Get the wxLuaStateRefData from lua itself ! int top = lua_gettop( L ); ! // try to get the state ! lua_pushstring( L, "__wxLuaStateRefData" ); ! lua_gettable( L, LUA_REGISTRYINDEX ); ! // if nothing was returned or it wasn't a ptr, abort ! if ( (top == lua_gettop(L)) || !lua_islightuserdata(L, -1) ) ! { ! wxPrintf(wxT("wxLuaStateRefData::GetLuaStateRefData FAILED!\n")); ! lua_settop( L, top ); ! return NULL; ! } ! ! // get the pointer, clean the stack, return ! wxLuaStateRefData* d = (wxLuaStateRefData*)lua_touserdata( L, -1 ); lua_settop( L, top ); ! return d; } } *************** *** 1263,1266 **** --- 1192,1197 ---- luaL_openlibs(L); + // track this newly created lua_State in our hashtable to help us + // find the wxLuaStateRefData from the lua_State quickly wxLuaStateRefData::s_wxHashMapLuaStateRefData[L] = M_WXLSTATEDATA; *************** *** 1299,1303 **** wxLuaStateRefData *refData = wxLuaStateRefData::GetLuaStateRefData(L); wxCHECK_MSG(refData != NULL, false, wxT("Unable to find lua_State")); ! return Create(refData); } else if (type == WXLUASTATE_SETSTATE) --- 1230,1234 ---- wxLuaStateRefData *refData = wxLuaStateRefData::GetLuaStateRefData(L); wxCHECK_MSG(refData != NULL, false, wxT("Unable to find lua_State")); ! return Create(refData, L); } else if (type == WXLUASTATE_SETSTATE) *************** *** 1328,1346 **** return true; } - else if (type == WXLUASTATE_COROUTINE) - { - m_refData = new wxLuaStateRefData(); - M_WXLSTATEDATA->m_lua_State = L; - M_WXLSTATEDATA->m_lua_State_static = true; - wxLuaStateRefData::s_wxHashMapLuaStateRefData[L] = M_WXLSTATEDATA; - - // Stick us into the lua_State - push key, value - lua_pushstring( L, "__wxLuaStateRefData" ); - lua_pushlightuserdata( L, (void*)m_refData ); - // set the value - lua_settable( L, LUA_REGISTRYINDEX ); - - return true; - } m_refData = new wxLuaStateRefData(); --- 1259,1262 ---- *************** *** 1352,1356 **** } ! bool wxLuaState::Create(wxLuaStateRefData* refData) { // nothing to be done --- 1268,1272 ---- } ! bool wxLuaState::Create(wxLuaStateRefData* refData, lua_State* L) { // nothing to be done *************** *** 1362,1366 **** // reference new data ! if ( refData ) { // we need to increment the ref count, but it's private in wxObjectRefData --- 1278,1282 ---- // reference new data ! if ( refData && (L == refData->m_lua_State)) { // we need to increment the ref count, but it's private in wxObjectRefData *************** *** 1370,1373 **** --- 1286,1301 ---- lS.SetRefData(NULL); } + else + { + // Create a new wxLuaState for the coroutine and set the wxLuaStateData + // to the original wxLuaState's data + m_refData = new wxLuaStateRefData(false); + M_WXLSTATEDATA->m_lua_State = L; + M_WXLSTATEDATA->m_lua_State_static = true; + M_WXLSTATEDATA->m_lua_State_coroutine = true; + + M_WXLSTATEDATA->m_wxlStateData = refData->m_wxlStateData; + M_WXLSTATEDATA->m_own_stateData = false; + } return true; |
From: John L. <jr...@us...> - 2006-12-06 06:58:28
|
Update of /cvsroot/wxlua/wxLua/modules/lua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21762/wxLua/modules/lua/src Modified Files: lstate.c Removed Files: luathread.h Log Message: removed WXLUA_USE_NEWTHREAD_HANDLER and friends by replacing luaE_newthread, luaE_freethread we now look up coroutine wxLuaStateData by using a light user data pushed into the lua registry table the lua is now an unmodified copy of lua with no mods necessary Index: lstate.c =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/lstate.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lstate.c 12 Jun 2006 03:50:37 -0000 1.5 --- lstate.c 6 Dec 2006 06:58:23 -0000 1.6 *************** *** 116,166 **** } - #ifndef WXLUA_LUA_NEWTHREAD - lua_State *luaE_newthread (lua_State *L) { - lua_State *L1 = tostate(luaM_malloc(L, state_size(lua_State))); - luaC_link(L, obj2gco(L1), LUA_TTHREAD); - preinit_state(L1, G(L)); - stack_init(L1, L); /* init stack */ - setobj2n(L, gt(L1), gt(L)); /* share table of globals */ - L1->hookmask = L->hookmask; - L1->basehookcount = L->basehookcount; - L1->hook = L->hook; - resethookcount(L1); - lua_assert(iswhite(obj2gco(L1))); - return L1; - } - - - void luaE_freethread (lua_State *L, lua_State *L1) { - luaF_close(L1, L1->stack); /* close all upvalues for this thread */ - lua_assert(L1->openupval == NULL); - luai_userstatefree(L1); - freestack(L, L1); - luaM_freemem(L, fromstate(L1), state_size(lua_State)); - } - #else // WXLUA_LUA_NEWTHREAD is defined - /* wxlua - track child threads see wxLuaState */ - //#include <luathread.h> - typedef void (* wxlua_newthread_handler)(lua_State *L, lua_State *NL); - typedef void (* wxlua_freethread_handler)(lua_State *L, lua_State *NL); - - static wxlua_newthread_handler pNewthread_handler = (wxlua_newthread_handler) NULL; - static wxlua_freethread_handler pFreethread_handler = (wxlua_freethread_handler) NULL; - - LUA_API wxlua_newthread_handler wxLua_lua_getnewthreadhandler() { - return pNewthread_handler; - } - - LUA_API void wxLua_lua_setnewthreadhandler( wxlua_newthread_handler handler ) { - pNewthread_handler = handler; - } - - LUA_API wxlua_freethread_handler wxLua_lua_getfreethreadhandler() { - return pFreethread_handler; - } - - LUA_API void wxLua_lua_setfreethreadhandler( wxlua_freethread_handler handler ) { - pFreethread_handler = handler; - } lua_State *luaE_newthread (lua_State *L) { --- 116,119 ---- *************** *** 175,182 **** resethookcount(L1); lua_assert(iswhite(obj2gco(L1))); - - if (pNewthread_handler) - (*pNewthread_handler)(L, L1); /* wxlua added newthread tracker */ - return L1; } --- 128,131 ---- *************** *** 184,190 **** void luaE_freethread (lua_State *L, lua_State *L1) { - if (pFreethread_handler) - (*pFreethread_handler)(L, L1); /* wxlua added freethread tracker */ - luaF_close(L1, L1->stack); /* close all upvalues for this thread */ lua_assert(L1->openupval == NULL); --- 133,136 ---- *************** *** 193,197 **** luaM_freemem(L, fromstate(L1), state_size(lua_State)); } - #endif // WXLUA_LUA_NEWTHREAD --- 139,142 ---- --- luathread.h DELETED --- |
From: John L. <jr...@us...> - 2006-12-06 06:58:28
|
Update of /cvsroot/wxlua/wxLua/modules/build/msw In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21762/wxLua/modules/build/msw Modified Files: modules_mod_lua.dsp modules_mod_verbatimlua.dsp Log Message: removed WXLUA_USE_NEWTHREAD_HANDLER and friends by replacing luaE_newthread, luaE_freethread we now look up coroutine wxLuaStateData by using a light user data pushed into the lua registry table the lua is now an unmodified copy of lua with no mods necessary Index: modules_mod_verbatimlua.dsp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/msw/modules_mod_verbatimlua.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** modules_mod_verbatimlua.dsp 21 May 2006 09:55:24 -0000 1.1 --- modules_mod_verbatimlua.dsp 6 Dec 2006 06:58:23 -0000 1.2 *************** *** 467,474 **** SOURCE=..\..\lua\include\lualib.h # End Source File - # Begin Source File - - SOURCE=..\..\lua\include\luathread.h - # End Source File # End Group # Begin Group "Source Files" --- 467,470 ---- Index: modules_mod_lua.dsp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/msw/modules_mod_lua.dsp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** modules_mod_lua.dsp 21 May 2006 09:55:24 -0000 1.20 --- modules_mod_lua.dsp 6 Dec 2006 06:58:23 -0000 1.21 *************** *** 467,474 **** SOURCE=..\..\lua\include\lualib.h # End Source File - # Begin Source File - - SOURCE=..\..\lua\include\luathread.h - # End Source File # End Group # Begin Group "Source Files" --- 467,470 ---- |
From: John L. <jr...@us...> - 2006-12-05 23:38:32
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14362/wxLua/apps/wxlua/src Modified Files: editor.h lconsole.cpp lconsole.h wxlua.cpp Log Message: cleanup the wxLuaConsole fix the editor saving before running code, print process id and use the wxLuaConsole when running Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** wxlua.cpp 4 Oct 2006 05:55:02 -0000 1.38 --- wxlua.cpp 5 Dec 2006 23:38:28 -0000 1.39 *************** *** 222,225 **** --- 222,232 ---- } + // check to see if there is a toplevel window open for the user to close, else exit + if (fOk) + { + if (GetTopWindow() == NULL) + fOk = false; + } + return (m_luaConsole != NULL) || fOk; } *************** *** 275,279 **** else #ifdef __WXMSW__ ! wxMessageBox(errorStr, wxT("wxLua")); #else fprintf(stderr, wx2lua(errorStr + wxT("\n"))); --- 282,286 ---- else #ifdef __WXMSW__ ! wxMessageBox(errorStr, wxT("wxLua Error")); #else fprintf(stderr, wx2lua(errorStr + wxT("\n"))); *************** *** 336,342 **** else #ifdef __WXMSW__ ! wxMessageBox(event.GetString(), wxT("wxLua")); #else fprintf(stderr, wx2lua(event.GetString() + wxT("\n"))); #endif // __WXMSW__ } --- 343,350 ---- else #ifdef __WXMSW__ ! wxMessageBox(event.GetString(), wxT("wxLua Print")); #else fprintf(stderr, wx2lua(event.GetString() + wxT("\n"))); + //wxPrintf(event.GetString() + wxT("\n")); #endif // __WXMSW__ } Index: lconsole.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lconsole.h 5 Sep 2006 21:48:10 -0000 1.6 --- lconsole.h 5 Dec 2006 23:38:28 -0000 1.7 *************** *** 21,28 **** // ---------------------------------------------------------------------------- ! class wxLuaDebugPanel : public wxPanel { public: ! wxLuaDebugPanel(wxWindow *parent, const wxLuaState& wxlState); void FillListbox(); --- 21,28 ---- // ---------------------------------------------------------------------------- ! class wxLuaDebugListBox : public wxListBox { public: ! wxLuaDebugListBox(wxWindow *parent, const wxLuaState& wxlState); void FillListbox(); *************** *** 30,39 **** protected: wxLuaState m_wxlState; - wxListBox* m_listBox; - - void OnSizeWindow(wxSizeEvent& event); - void OnEraseBackground(wxEraseEvent& WXUNUSED(event)) {} - - DECLARE_EVENT_TABLE() }; --- 30,33 ---- *************** *** 46,60 **** public: wxLuaConsole(wxLuaStandaloneApp *pApp, const wxLuaState& wxlState); ! void DisplayText(wxString msg, bool fError = false); protected: void OnCloseWindow(wxCloseEvent& event); - void OnEraseBackground(wxEraseEvent& WXUNUSED(event)) {} - void FillListbox(); wxSplitterWindow *m_splitter; wxTextCtrl *m_textCtrl; wxLuaStandaloneApp *m_pApp; ! wxLuaDebugPanel *m_panel; bool m_fError; --- 40,52 ---- public: wxLuaConsole(wxLuaStandaloneApp *pApp, const wxLuaState& wxlState); ! void DisplayText(const wxString& msg, bool fError = false); protected: void OnCloseWindow(wxCloseEvent& event); wxSplitterWindow *m_splitter; wxTextCtrl *m_textCtrl; wxLuaStandaloneApp *m_pApp; ! wxLuaDebugListBox *m_debugListBox; bool m_fError; Index: editor.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/editor.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** editor.h 5 Oct 2006 05:10:44 -0000 1.26 --- editor.h 5 Dec 2006 23:38:28 -0000 1.27 *************** *** 5,2006 **** #include <stdio.h> /* for size_t */ ! /* Original filename: '../../../samples/editor.wx.lua' */ extern const size_t wxLuaEditor_len; extern const unsigned char wxLuaEditor[]; ! const size_t wxLuaEditor_len = 73920; ! const unsigned char wxLuaEditor[73921] = { ! 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 61, 45, 45, 45, 10, ! 45, 45, 32, 78, 97,109,101, 58, 32, 32, 32, 32, 32, 32, 32, 32, 69,100,105,116,111,114, 46,119,120, 46,108,117, 97, 10, [...3998 lines suppressed...] ! 13, 10, ! 32, 32, 32, 32,102,111,114, 32,105,110,100,101,120, 32, 61, 32, 49, 44, 32, 35, 97,114,103, 32,100,111, 13, 10, ! 32, 32, 32, 32, 32, 32, 32, 32,102,105,108,101, 78, 97,109,101, 32, 61, 32, 97,114,103, 91,105,110,100,101,120, 93, 13, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 76,111, 97,100, 70,105,108,101, 40,102,105,108,101, 78, 97,109,101, 44, 32,102,105,108,101, 78, 97,109,101, 41, 13, 10, ! 32, 32, 32, 32,101,110,100, 13, 10, ! 13, 10, ! 32, 32, 32, 32,105,102, 32,110,111,116,101, 98,111,111,107, 58, 71,101,116, 80, 97,103,101, 67,111,117,110,116, 40, 41, 32, 62, 32, 48, 32,116,104,101,110, 13, 10, ! 32, 32, 32, 32, 32, 32, 32, 32,110,111,116,101, 98,111,111,107, 58, 83,101,116, 83,101,108,101, 99,116,105,111,110, 40, 48, 41, 13, 10, ! 32, 32, 32, 32,101,108,115,101, 13, 10, ! 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,101,100,105,116,111,114, 32, 61, 32, 67,114,101, 97,116,101, 69,100,105,116,111,114, 40, 34, 85,110,116,105,116,108,101,100, 34, 41, 13, 10, ! 32, 32, 32, 32, 32, 32, 32, 83,101,116,117,112, 75,101,121,119,111,114,100,115, 40,101,100,105,116,111,114, 44, 32,116,114,117,101, 41, 13, 10, ! 32, 32, 32, 32,101,110,100, 13, 10, ! 101,108,115,101, 13, 10, ! 32, 32, 32, 32,108,111, 99, 97,108, 32,101,100,105,116,111,114, 32, 61, 32, 67,114,101, 97,116,101, 69,100,105,116,111,114, 40, 34, 85,110,116,105,116,108,101,100, 34, 41, 13, 10, ! 32, 32, 32, 32, 83,101,116,117,112, 75,101,121,119,111,114,100,115, 40,101,100,105,116,111,114, 44, 32,116,114,117,101, 41, 13, 10, ! 101,110,100, 13, 10, ! 13, 10, ! 45, 45,102,114, 97,109,101, 58, 83,101,116, 73, 99,111,110, 40,119,120, 76,117, 97, 69,100,105,116,111,114, 73, 99,111,110, 41, 32, 45, 45, 70, 73, 88, 77, 69, 32, 97,100,100, 32,116,104,105,115, 32, 98, 97, 99,107, 13, 10, 0 }; Index: lconsole.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** lconsole.cpp 7 Sep 2006 04:20:53 -0000 1.11 --- lconsole.cpp 5 Dec 2006 23:38:28 -0000 1.12 *************** *** 37,60 **** // ---------------------------------------------------------------------------- ! BEGIN_EVENT_TABLE(wxLuaDebugPanel, wxPanel) ! EVT_ERASE_BACKGROUND(wxLuaDebugPanel::OnEraseBackground) ! EVT_SIZE(wxLuaDebugPanel::OnSizeWindow) ! END_EVENT_TABLE() ! ! wxLuaDebugPanel::wxLuaDebugPanel(wxWindow *parent, const wxLuaState& wxlState) ! : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(50, 1500)) { ! m_wxlState = wxlState; ! m_listBox = new wxListBox( this, wxID_ANY, wxPoint(0, 20), wxSize(0, 130), ! 0, NULL, wxLB_SINGLE); ! } ! void wxLuaDebugPanel::OnSizeWindow(wxSizeEvent& event) ! { ! wxSize size = event.GetSize(); ! m_listBox->SetSize(0, 0, size.x, size.y); } ! void wxLuaDebugPanel::FillListbox() { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); --- 37,51 ---- // ---------------------------------------------------------------------------- ! wxLuaDebugListBox::wxLuaDebugListBox(wxWindow *parent, const wxLuaState& wxlState) ! :wxListBox() { ! if (!wxListBox::Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, ! 0, NULL, wxLB_SINGLE)) ! return; ! m_wxlState = wxlState; } ! void wxLuaDebugListBox::FillListbox() { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); *************** *** 63,67 **** wxString buffer; ! m_listBox->Clear(); lua_State* L = m_wxlState.GetLuaState(); --- 54,58 ---- wxString buffer; ! Clear(); lua_State* L = m_wxlState.GetLuaState(); *************** *** 75,80 **** { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s"), ! luaDebug.name); else buffer.Printf(wxT("{global}")); --- 66,71 ---- { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s"), ! lua2wx(luaDebug.name).c_str()); else buffer.Printf(wxT("{global}")); *************** *** 83,91 **** { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s line %u"), ! luaDebug.name, lineNumber); else ! buffer.Printf(wxT("{global} line %u"), lineNumber); } --- 74,82 ---- { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s line %d"), ! lua2wx(luaDebug.name).c_str(), lineNumber); else ! buffer.Printf(wxT("{global} line %d"), lineNumber); } *************** *** 93,97 **** // skip over ourselves on the stack if (nIndex > 0) ! m_listBox->Append(buffer, (void *) nIndex); } nIndex++; --- 84,88 ---- // skip over ourselves on the stack if (nIndex > 0) ! Append(buffer, (void *) nIndex); } nIndex++; *************** *** 105,113 **** BEGIN_EVENT_TABLE(wxLuaConsole, wxFrame) EVT_CLOSE(wxLuaConsole::OnCloseWindow) - EVT_ERASE_BACKGROUND(wxLuaConsole::OnEraseBackground) END_EVENT_TABLE() wxLuaConsole::wxLuaConsole(wxLuaStandaloneApp *pApp, const wxLuaState& wxlState) ! : wxFrame(NULL, wxID_ANY, wxT("wxLua Console"), wxDefaultPosition, wxSize(250, 340)), m_pApp(pApp), m_fError(false) { --- 96,103 ---- BEGIN_EVENT_TABLE(wxLuaConsole, wxFrame) EVT_CLOSE(wxLuaConsole::OnCloseWindow) END_EVENT_TABLE() wxLuaConsole::wxLuaConsole(wxLuaStandaloneApp *pApp, const wxLuaState& wxlState) ! : wxFrame(NULL, wxID_ANY, wxT("wxLua Console"), wxDefaultPosition, wxSize(300, 340)), m_pApp(pApp), m_fError(false) { *************** *** 115,121 **** m_splitter = new wxSplitterWindow(this, wxID_ANY, ! wxPoint(0, 0), wxSize(0, 0), wxSP_3DSASH); m_textCtrl = new wxTextCtrl( m_splitter, wxID_ANY, wxT(""), ! wxPoint(0, 0), wxSize(0, 0), wxTE_MULTILINE | wxTE_READONLY #ifdef __WXMSW__ --- 105,112 ---- m_splitter = new wxSplitterWindow(this, wxID_ANY, ! wxDefaultPosition, wxDefaultSize, ! wxSP_3DSASH); m_textCtrl = new wxTextCtrl( m_splitter, wxID_ANY, wxT(""), ! wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY #ifdef __WXMSW__ *************** *** 123,129 **** #endif ); ! m_panel = new wxLuaDebugPanel( m_splitter, wxlState); ! m_splitter->SplitHorizontally( m_textCtrl, m_panel, 150); ! m_splitter->SetMinimumPaneSize(50); pApp->SetLuaConsole(this); --- 114,122 ---- #endif ); ! m_debugListBox = new wxLuaDebugListBox( m_splitter, wxlState); ! m_debugListBox->Show(false); ! ! // listbox is shown only when used ! m_splitter->Initialize(m_textCtrl); pApp->SetLuaConsole(this); *************** *** 139,149 **** } ! void wxLuaConsole::DisplayText(wxString msg, bool fError) { if (fError) m_fError = true; ! msg += wxString(wxT("\n")); ! m_textCtrl->AppendText(msg); if (fError) ! m_panel->FillListbox(); } --- 132,153 ---- } ! void wxLuaConsole::DisplayText(const wxString& msg, bool fError) { if (fError) m_fError = true; ! ! m_textCtrl->AppendText(msg + wxT("\n")); ! if (fError) ! { ! m_debugListBox->FillListbox(); ! ! // only show the listbox if it has anything in it ! if (m_debugListBox->GetCount() && !m_splitter->IsSplit()) ! { ! m_splitter->SplitHorizontally( m_textCtrl, m_debugListBox, 150); ! m_splitter->SetMinimumPaneSize(50); ! } ! ! } } |
From: John L. <jr...@us...> - 2006-12-05 23:38:32
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14362/wxLua/samples Modified Files: editor.wx.lua Log Message: cleanup the wxLuaConsole fix the editor saving before running code, print process id and use the wxLuaConsole when running Index: editor.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/editor.wx.lua,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** editor.wx.lua 5 Oct 2006 05:10:48 -0000 1.32 --- editor.wx.lua 5 Dec 2006 23:38:28 -0000 1.33 *************** *** 726,731 **** { ID_OPEN, "&Open...\tCtrl-O", "Open an existing document" }, { ID_SAVE, "&Save\tCtrl-S", "Save the current document" }, ! { ID_SAVEAS, "Save &As...\tCtrl-A", "Save the current document to a file with a new name" }, ! { ID_SAVEALL, "Save A&ll...", "Save all open documents" }, { ID_CLOSE, "&Close\tCtrl+W", "Close the current editor window" }, { }, --- 726,731 ---- { ID_OPEN, "&Open...\tCtrl-O", "Open an existing document" }, { ID_SAVE, "&Save\tCtrl-S", "Save the current document" }, ! { ID_SAVEAS, "Save &As...\tAlt-S", "Save the current document to a file with a new name" }, ! { ID_SAVEALL, "Save A&ll...\tCtrl-Shift-S", "Save all open documents" }, { ID_CLOSE, "&Close\tCtrl+W", "Close the current editor window" }, { }, *************** *** 797,806 **** function SaveFile(editor, filePath) ! local st = editor:GetText() ! local backPath = filePath..".bak" ! os.remove(backPath) ! os.rename(filePath, backPath) local handle = io.open(filePath, "wb") if handle then handle:write(st) handle:close() --- 797,808 ---- function SaveFile(editor, filePath) ! if filePath then ! local backPath = filePath..".bak" ! os.remove(backPath) ! os.rename(filePath, backPath) ! end local handle = io.open(filePath, "wb") if handle then + local st = editor:GetText() handle:write(st) handle:close() *************** *** 1507,1518 **** local id = editor:GetId(); if openDocuments[id].isModified then ! SaveFile(editor, openDocuments[id].filePath) ! openDocuments[id].isModified = false end ! local cmd = '"'..programName..'" '..openDocuments[id].filePath DisplayOutput("Running program: "..cmd.."\n") ! wx.wxExecute(cmd, wx.wxEXEC_ASYNC) end) frame:Connect(ID_RUN, wx.wxEVT_UPDATE_UI, --- 1509,1541 ---- local id = editor:GetId(); if openDocuments[id].isModified then ! local saved = false ! if not openDocuments[id].filePath then ! local ret = wx.wxMessageBox("You must save the program before running it.\nPress cancel to abort running.", ! "Save file?", ! wx.wxOK + wx.wxCANCEL + wx.wxCENTRE, frame) ! if ret == wx.wxOK then ! saved = SaveFileAs(editor) ! end ! else ! saved = SaveFile(editor, openDocuments[id].filePath) ! end ! ! if saved then ! openDocuments[id].isModified = false ! else ! return ! end end ! local cmd = '"'..programName..'" -c '..openDocuments[id].filePath DisplayOutput("Running program: "..cmd.."\n") ! local pid = wx.wxExecute(cmd, wx.wxEXEC_ASYNC) ! ! if pid == -1 then ! DisplayOutput(" Unknown ERROR Running program!\n") ! else ! DisplayOutput(" Process id is: "..tostring(pid).."\n") ! end end) frame:Connect(ID_RUN, wx.wxEVT_UPDATE_UI, |
From: John L. <jr...@us...> - 2006-12-05 23:38:32
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14362/wxLua/modules/wxluasocket/src Modified Files: wxlsock.cpp Log Message: cleanup the wxLuaConsole fix the editor saving before running code, print process id and use the wxLuaConsole when running Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxlsock.cpp 1 Dec 2006 23:40:27 -0000 1.21 --- wxlsock.cpp 5 Dec 2006 23:38:28 -0000 1.22 *************** *** 254,258 **** wxLuaSocketDebugMsg(m_name + wxT(" wxLuaSocketBase::WriteDebugData"), wxString::Format(wxT("items %d"), idxMax)); ! ok = WriteInt32(idxMax); for (idx = 0; ok && (idx < idxMax); ++idx) --- 254,258 ---- wxLuaSocketDebugMsg(m_name + wxT(" wxLuaSocketBase::WriteDebugData"), wxString::Format(wxT("items %d"), idxMax)); ! ok = Write((const char*)&idxMax, sizeof(wxInt32)) == sizeof(wxInt32); for (idx = 0; ok && (idx < idxMax); ++idx) *************** *** 276,280 **** unsigned char *pMemory = pBuffer; ! ok = Write((const char*)&bufferLength, sizeof(wxInt32)); if (!ok) break; --- 276,280 ---- unsigned char *pMemory = pBuffer; ! ok = Write((const char*)&bufferLength, sizeof(wxInt32)) == sizeof(wxInt32); if (!ok) break; *************** *** 299,303 **** memcpy(pMemory, sourceBuffer.GetData(), sourceLength); ! ok = Write((const char *) pBuffer, bufferLength); delete[] pBuffer; --- 299,303 ---- memcpy(pMemory, sourceBuffer.GetData(), sourceLength); ! ok = Write((const char *) pBuffer, bufferLength) == sizeof(wxInt32); delete[] pBuffer; |
From: John L. <jr...@us...> - 2006-12-04 05:54:44
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23310/wxLua/modules/wxbindstc/src Modified Files: wxstc_bind.cpp Log Message: update docs remove unnecessary extern declarations in the cpp binding files Index: wxstc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/wxstc_bind.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** wxstc_bind.cpp 1 Dec 2006 06:25:47 -0000 1.13 --- wxstc_bind.cpp 4 Dec 2006 05:54:41 -0000 1.14 *************** *** 1493,1501 **** // bind wxLuaBinding_wxstc to a single wxLuaState - extern bool wxLuaBinding_wxstc_bind(const wxLuaState& wxlState); - // initialize wxLuaBinding_wxstc for all wxLuaStates - extern bool wxLuaBinding_wxstc_init(); - - // bind wxLuaBinding_wxstc to a single wxLuaState bool wxLuaBinding_wxstc_bind(const wxLuaState& wxlState_) { --- 1493,1496 ---- |
From: John L. <jr...@us...> - 2006-12-04 05:54:44
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23310/wxLua/modules/wxluasocket/src Modified Files: wxluasocket_bind.cpp Log Message: update docs remove unnecessary extern declarations in the cpp binding files Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxluasocket_bind.cpp 1 Dec 2006 06:25:47 -0000 1.8 --- wxluasocket_bind.cpp 4 Dec 2006 05:54:41 -0000 1.9 *************** *** 173,181 **** // bind wxLuaBinding_wxluasocket to a single wxLuaState - extern bool wxLuaBinding_wxluasocket_bind(const wxLuaState& wxlState); - // initialize wxLuaBinding_wxluasocket for all wxLuaStates - extern bool wxLuaBinding_wxluasocket_init(); - - // bind wxLuaBinding_wxluasocket to a single wxLuaState bool wxLuaBinding_wxluasocket_bind(const wxLuaState& wxlState_) { --- 173,176 ---- |
From: John L. <jr...@us...> - 2006-12-04 05:54:44
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23310/wxLua/modules/wxbind/src Modified Files: wx_bind.cpp Log Message: update docs remove unnecessary extern declarations in the cpp binding files Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** wx_bind.cpp 1 Dec 2006 06:25:46 -0000 1.63 --- wx_bind.cpp 4 Dec 2006 05:54:40 -0000 1.64 *************** *** 6367,6375 **** // bind wxLuaBinding_wx to a single wxLuaState - extern bool wxLuaBinding_wx_bind(const wxLuaState& wxlState); - // initialize wxLuaBinding_wx for all wxLuaStates - extern bool wxLuaBinding_wx_init(); - - // bind wxLuaBinding_wx to a single wxLuaState bool wxLuaBinding_wx_bind(const wxLuaState& wxlState_) { --- 6367,6370 ---- |
From: John L. <jr...@us...> - 2006-12-04 05:54:43
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23310/wxLua/docs Modified Files: binding.html Log Message: update docs remove unnecessary extern declarations in the cpp binding files Index: binding.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/binding.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** binding.html 9 Jun 2006 03:24:49 -0000 1.11 --- binding.html 4 Dec 2006 05:54:40 -0000 1.12 *************** *** 3,16 **** <head> - - <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> ! ! - [...2290 lines suppressed...] %__WXPM__<br> %__WXSTUBS__<br> %__WXXT__<br> %__WXX11__<br> %__WXWINE__<br> %__WXUNIVERSAL__<br> %__X__<br> %__WXWINCE__<br> <br> </body> </html> |
From: John L. <jr...@us...> - 2006-12-04 05:54:43
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23310/wxLua/bindings Modified Files: genwxbind.lua Log Message: update docs remove unnecessary extern declarations in the cpp binding files Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** genwxbind.lua 1 Dec 2006 06:25:46 -0000 1.84 --- genwxbind.lua 4 Dec 2006 05:54:40 -0000 1.85 *************** *** 603,607 **** if conditions[condition] then result = conditions[condition] ! elseif string.find(condition, "%wxchkver", 1, 1) then -- check for conditions like %wxchkver_1_2_3 = wxCHECK_VERSION(1,2,3) local ver = { 0, 0, 0 } --- 603,607 ---- if conditions[condition] then result = conditions[condition] ! elseif string.find(condition, "%wxchkver_", 1, 1) then -- check for conditions like %wxchkver_1_2_3 = wxCHECK_VERSION(1,2,3) local ver = { 0, 0, 0 } *************** *** 612,615 **** --- 612,621 ---- result = string.format("wxCHECK_VERSION(%d,%d,%d)", ver[1], ver[2], ver[3]) conditions[condition] = result -- cache result + elseif string.find(condition, "%wxcompat_", 1, 1) then + -- check for conditions like %wxcompat_1_2 = WXWIN_COMPATIBILITY_1_2 + local p1, p2 = string.find(condition, "%wxcompat_", 1, 1) + result = "WXWIN_COMPATIBILITY"..string.sub(condition, p2) + result = "(defined("..result..") && "..result..")" + conditions[condition] = result -- cache result elseif string.find(condition, "wxLUA_USE_", 1, 1) then print("Warning unknown wxLUA_USE_XXX tag, maybe a missing condition? '"..condition.."'") *************** *** 4300,4308 **** table.insert(fileData, "// bind "..hook_cpp_binding_classname.." to a single wxLuaState\n") - table.insert(fileData, "extern bool "..hook_cpp_binding_classname.."_bind(const wxLuaState& wxlState);\n") - table.insert(fileData, "// initialize "..hook_cpp_binding_classname.." for all wxLuaStates\n") - table.insert(fileData, "extern bool "..hook_cpp_binding_classname.."_init();\n\n") - - table.insert(fileData, "// bind "..hook_cpp_binding_classname.." to a single wxLuaState\n") table.insert(fileData, "bool "..hook_cpp_binding_classname.."_bind(const wxLuaState& wxlState_)\n") table.insert(fileData, "{\n") --- 4306,4309 ---- |
From: John L. <jr...@us...> - 2006-12-01 23:40:31
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26750/wxLua/modules/wxluasocket/include Modified Files: wxldserv.h Log Message: socket cleanup\ Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wxldserv.h 8 Oct 2006 18:58:33 -0000 1.24 --- wxldserv.h 1 Dec 2006 23:40:27 -0000 1.25 *************** *** 172,182 **** // Check if the socket is connected and if not send a // wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED event with a socket error msg ! virtual bool CheckSocketConnected(bool send_event = true); // Check if the input is true (eg. return of a socket read) and if not send a // wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED with a read error msg ! virtual bool CheckSocketRead(bool read_ok); // Check if the input is true (eg. return of a socket write) and if not send a // wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED with a write error msg ! virtual bool CheckSocketWrite(bool write_ok); // Send the event to this wxEvtHandler --- 172,182 ---- // Check if the socket is connected and if not send a // wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED event with a socket error msg ! virtual bool CheckSocketConnected(bool send_event = true, const wxString& msg = wxEmptyString); // Check if the input is true (eg. return of a socket read) and if not send a // wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED with a read error msg ! virtual bool CheckSocketRead(bool read_ok, const wxString& msg = wxEmptyString); // Check if the input is true (eg. return of a socket write) and if not send a // wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED with a write error msg ! virtual bool CheckSocketWrite(bool write_ok, const wxString& msg = wxEmptyString); // Send the event to this wxEvtHandler |
From: John L. <jr...@us...> - 2006-12-01 23:40:31
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26750/wxLua/modules/wxluasocket/src Modified Files: wxldserv.cpp wxlsock.cpp Log Message: socket cleanup\ Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wxldserv.cpp 5 Oct 2006 05:10:47 -0000 1.30 --- wxldserv.cpp 1 Dec 2006 23:40:27 -0000 1.31 *************** *** 472,476 **** ! bool wxLuaDebuggerBase::CheckSocketConnected(bool send_event) { if (GetSocketBase() == NULL) --- 472,476 ---- ! bool wxLuaDebuggerBase::CheckSocketConnected(bool send_event, const wxString& msg) { if (GetSocketBase() == NULL) *************** *** 479,483 **** { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxT("Debugger socket not created.")); SendEvent(debugEvent); } --- 479,483 ---- { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxT("Debugger socket not created. ") + msg); SendEvent(debugEvent); } *************** *** 491,495 **** { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxT("Debugger socket not connected.")); SendEvent(debugEvent); } --- 491,495 ---- { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxT("Debugger socket not connected. ") + msg); SendEvent(debugEvent); } *************** *** 500,509 **** return true; } ! bool wxLuaDebuggerBase::CheckSocketRead(bool read_ok) { if (!read_ok) { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxT("Failed reading from the debugger socket.")); SendEvent(debugEvent); } --- 500,509 ---- return true; } ! bool wxLuaDebuggerBase::CheckSocketRead(bool read_ok, const wxString& msg) { if (!read_ok) { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxT("Failed reading from the debugger socket. ") + msg); SendEvent(debugEvent); } *************** *** 511,520 **** return read_ok; } ! bool wxLuaDebuggerBase::CheckSocketWrite(bool write_ok) { if (!write_ok) { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxT("Failed writing to the debugger socket.")); SendEvent(debugEvent); } --- 511,520 ---- return read_ok; } ! bool wxLuaDebuggerBase::CheckSocketWrite(bool write_ok, const wxString& msg) { if (!write_ok) { wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, this); ! debugEvent.SetMessage(wxT("Failed writing to the debugger socket. ") + msg); SendEvent(debugEvent); } Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxlsock.cpp 11 Oct 2006 03:24:03 -0000 1.20 --- wxlsock.cpp 1 Dec 2006 23:40:27 -0000 1.21 *************** *** 159,212 **** bool ok = false; ! try ! { ! wxInt32 idx, idxMax = 0; ! ok = ReadInt32(idxMax); ! wxLuaSocketDebugMsg(m_name + wxT(" wxLuaSocketBase::ReadDebugData"), wxString::Format(wxT("items %d"), idxMax)); ! for (idx = 0; ok && (idx < idxMax); ++idx) ! { ! wxInt32 bufferLength = 0; ! ok = Read((char*)&bufferLength, sizeof(wxInt32)) == sizeof(wxInt32); ! if (ok && (bufferLength > 0)) ! { ! char *pBuffer = new char[bufferLength]; ! char *pMemory = pBuffer; ! ok = Read(pMemory, bufferLength) == bufferLength; ! if (!ok) break; ! wxInt32 nReference = *(wxInt32 *) pMemory; ! pMemory += sizeof(wxInt32); ! wxInt32 nIndex = *(wxInt32 *) pMemory; ! pMemory += sizeof(wxInt32); ! bool fExpanded = (0 != (*(wxInt32 *) pMemory)); ! pMemory += sizeof(wxInt32); ! const char *pNamePtr = pMemory; ! pMemory += strlen(pNamePtr) + 1; ! const char *pTypePtr = pMemory; ! pMemory += strlen(pTypePtr) + 1; ! const char *pValuePtr = pMemory; ! wxLuaDebugDataItem *pItem = new wxLuaDebugDataItem(lua2wx(pNamePtr), ! lua2wx(pTypePtr), ! lua2wx(pValuePtr), ! wxEmptyString, // FIXME! source? ! nReference, ! nIndex, ! fExpanded); ! debugData.Add(pItem); ! delete[] pBuffer; ! } } } - catch(wxLuaSocketException &) - { - } if (ok) value = debugData; --- 159,208 ---- bool ok = false; ! wxInt32 idx, idxMax = 0; ! ok = ReadInt32(idxMax); ! wxLuaSocketDebugMsg(m_name + wxT(" wxLuaSocketBase::ReadDebugData"), wxString::Format(wxT("items %d"), idxMax)); ! for (idx = 0; ok && (idx < idxMax); ++idx) ! { ! wxInt32 bufferLength = 0; ! ok = Read((char*)&bufferLength, sizeof(wxInt32)) == sizeof(wxInt32); ! if (ok && (bufferLength > 0)) ! { ! char *pBuffer = new char[bufferLength]; ! char *pMemory = pBuffer; ! ok = Read(pMemory, bufferLength) == bufferLength; ! if (!ok) break; ! wxInt32 nReference = *(wxInt32 *) pMemory; ! pMemory += sizeof(wxInt32); ! wxInt32 nIndex = *(wxInt32 *) pMemory; ! pMemory += sizeof(wxInt32); ! bool fExpanded = (0 != (*(wxInt32 *) pMemory)); ! pMemory += sizeof(wxInt32); ! const char *pNamePtr = pMemory; ! pMemory += strlen(pNamePtr) + 1; ! const char *pTypePtr = pMemory; ! pMemory += strlen(pTypePtr) + 1; ! const char *pValuePtr = pMemory; ! pMemory += strlen(pValuePtr) + 1; ! const char *pSourcePtr = pMemory; ! wxLuaDebugDataItem *pItem = new wxLuaDebugDataItem(lua2wx(pNamePtr), ! lua2wx(pTypePtr), ! lua2wx(pValuePtr), ! lua2wx(pSourcePtr), ! nReference, ! nIndex, ! fExpanded); ! debugData.Add(pItem); ! delete[] pBuffer; } } if (ok) value = debugData; *************** *** 247,309 **** bool wxLuaSocketBase::WriteDebugData(const wxLuaDebugData& debugData) { ! bool result = false; wxInt32 idx, idxMax = debugData.GetCount(); wxLuaSocketDebugMsg(m_name + wxT(" wxLuaSocketBase::WriteDebugData"), wxString::Format(wxT("items %d"), idxMax)); ! WriteInt32(idxMax); ! for (idx = 0; idx < idxMax; ++idx) { ! try ! { ! const wxLuaDebugDataItem *item = debugData.Item(idx); ! wxLuaCharBuffer nameBuffer(item->GetName()); ! wxLuaCharBuffer typeBuffer(item->GetType()); ! wxLuaCharBuffer valueBuffer(item->GetValue()); ! int nameLength = nameBuffer.Length() + 1; ! int typeLength = typeBuffer.Length() + 1; ! int valueLength = valueBuffer.Length() + 1; ! wxInt32 bufferLength = (3 * sizeof(wxInt32)) + ! nameLength + typeLength + valueLength; ! unsigned char *pBuffer = new unsigned char[bufferLength]; ! unsigned char *pMemory = pBuffer; ! Write((const char*)&bufferLength, sizeof(wxInt32)); ! *(wxInt32 *) pMemory = item->GetReference(); ! pMemory += sizeof(wxInt32); ! *(wxInt32 *) pMemory = item->GetIndex(); ! pMemory += sizeof(wxInt32); ! *(wxInt32 *) pMemory = item->IsExpanded() ? 1 : 0; ! pMemory += sizeof(wxInt32); ! memcpy(pMemory, nameBuffer.GetData(), nameLength); ! pMemory += nameLength; ! memcpy(pMemory, typeBuffer.GetData(), typeLength); ! pMemory += typeLength; ! memcpy(pMemory, valueBuffer.GetData(), valueLength); ! Write((const char *) pBuffer, bufferLength); ! delete[] pBuffer; ! result = true; ! } ! catch(wxLuaSocketException &) ! { ! } ! if (result == false) ! break; } ! return result; } --- 243,308 ---- bool wxLuaSocketBase::WriteDebugData(const wxLuaDebugData& debugData) { ! // Debug data is written as ! // [wxInt32 debug data item count] then for each item ! // [wxInt32 item data length] ! // [{wxInt32 GetReference}{wxInt32 GetIndex}{wxInt32 IsExpanded} ! // {char GetName \0}{char GetType \0}{char GetValue \0}{char GetSource \0}] ! ! bool ok = false; wxInt32 idx, idxMax = debugData.GetCount(); wxLuaSocketDebugMsg(m_name + wxT(" wxLuaSocketBase::WriteDebugData"), wxString::Format(wxT("items %d"), idxMax)); ! ok = WriteInt32(idxMax); ! for (idx = 0; ok && (idx < idxMax); ++idx) { ! const wxLuaDebugDataItem *item = debugData.Item(idx); ! wxLuaCharBuffer nameBuffer(item->GetName()); ! wxLuaCharBuffer typeBuffer(item->GetType()); ! wxLuaCharBuffer valueBuffer(item->GetValue()); ! wxLuaCharBuffer sourceBuffer(item->GetSource()); ! int nameLength = nameBuffer.Length() + 1; // add 1 for terminating \0 ! int typeLength = typeBuffer.Length() + 1; ! int valueLength = valueBuffer.Length() + 1; ! int sourceLength = sourceBuffer.Length() + 1; ! wxInt32 bufferLength = (3 * sizeof(wxInt32)) + ! nameLength + typeLength + valueLength + sourceLength; ! unsigned char *pBuffer = new unsigned char[bufferLength]; ! unsigned char *pMemory = pBuffer; ! ok = Write((const char*)&bufferLength, sizeof(wxInt32)); ! if (!ok) break; ! *(wxInt32 *) pMemory = (wxInt32)item->GetReference(); ! pMemory += sizeof(wxInt32); ! *(wxInt32 *) pMemory = (wxInt32)item->GetIndex(); ! pMemory += sizeof(wxInt32); ! *(wxInt32 *) pMemory = (wxInt32)(item->IsExpanded() ? 1 : 0); ! pMemory += sizeof(wxInt32); ! memcpy(pMemory, nameBuffer.GetData(), nameLength); ! pMemory += nameLength; ! memcpy(pMemory, typeBuffer.GetData(), typeLength); ! pMemory += typeLength; ! memcpy(pMemory, valueBuffer.GetData(), valueLength); ! pMemory += valueLength; ! memcpy(pMemory, sourceBuffer.GetData(), sourceLength); ! ok = Write((const char *) pBuffer, bufferLength); ! delete[] pBuffer; } ! ! return ok; } |
From: John L. <jr...@us...> - 2006-12-01 18:53:54
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8146/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp Log Message: start checking for LuaDelete function from the end since that's where it'll be Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** wxlbind.cpp 1 Dec 2006 06:25:47 -0000 1.42 --- wxlbind.cpp 1 Dec 2006 18:53:48 -0000 1.43 *************** *** 229,234 **** wxlState.RemoveTrackedMemory((void*)key, true); // delete from m_pTrackedList ! wxLongToLongHashMap::iterator it = wxlState.GetLuaStateData()->m_pDerivedList.find(key); ! if (it != wxlState.GetLuaStateData()->m_pDerivedList.end()) { //wxPrintf(wxT("wxLua_lua_garbageCollect - Derived GC '%s'\n"), lua2wx(pClass->name).c_str()); --- 229,235 ---- wxlState.RemoveTrackedMemory((void*)key, true); // delete from m_pTrackedList ! wxLongToLongHashMap& pDerivedList = wxlState.GetLuaStateData()->m_pDerivedList; ! wxLongToLongHashMap::iterator it = pDerivedList.find(key); ! if (it != pDerivedList.end()) { //wxPrintf(wxT("wxLua_lua_garbageCollect - Derived GC '%s'\n"), lua2wx(pClass->name).c_str()); *************** *** 239,249 **** it->second = 0; ! ! wxlState.GetLuaStateData()->m_pDerivedList.erase(it); } //else wxPrintf(wxT("wxLua_lua_garbageCollect - Invalid WXLUACLASS derived hashmap iterator key %d!\n"), key); int iMethod, method_count = pClass->num_methods; ! for (iMethod = 0; iMethod < method_count; ++iMethod) { WXLUAMETHOD *pMethod = pClass->methods + iMethod; --- 240,251 ---- it->second = 0; ! pDerivedList.erase(it); } //else wxPrintf(wxT("wxLua_lua_garbageCollect - Invalid WXLUACLASS derived hashmap iterator key %d!\n"), key); + // LuaDelete is placed at the end, so start there first and if found + // call the function int iMethod, method_count = pClass->num_methods; ! for (iMethod = method_count-1; iMethod >= 0; --iMethod) { WXLUAMETHOD *pMethod = pClass->methods + iMethod; *************** *** 271,275 **** // onto the lua stack, setting its tag so that the function tag of the object // will be called to invoke the function. - // todo: Handling of properties // ---------------------------------------------------------------------------- --- 273,276 ---- *************** *** 558,561 **** --- 559,563 ---- void LUACALL wxLuaBinding::RegisterGeneratedClasses(const wxLuaState& wxlState_, int tableOffset, bool registerTypes) { + // Replace the metatable functions for the functions we push into lua static const luaL_reg s_funcTable[] = { *************** *** 575,579 **** int iTag = m_startTag; ! // install the classes, functions and methods for (size_t iClass = 0; iClass < m_classCount; ++iClass, iTag = (registerTypes ? wxlState.tnewtag() : iTag + 1)) --- 577,583 ---- int iTag = m_startTag; ! // install the classes, functions and methods, creating new tags ! // if this is the first time we're registering them, else assume ! // they are in numerical order. for (size_t iClass = 0; iClass < m_classCount; ++iClass, iTag = (registerTypes ? wxlState.tnewtag() : iTag + 1)) *************** *** 582,585 **** --- 586,590 ---- *pClass->class_tag = iTag; + // set the metatable functions for the classes for (size_t iFunction = 0; iFunction < s_funcCount; iFunction++) { *************** *** 587,590 **** --- 592,596 ---- } + // install public functions like constructors or global functions int iMethod, method_count = pClass->num_methods; for (iMethod = 0; iMethod < method_count; ++iMethod) *************** *** 602,606 **** m_lastTag = iTag; ! // register all the builtin functions for (size_t iFunction = 0; iFunction < m_functionCount; ++iFunction) { --- 608,612 ---- m_lastTag = iTag; ! // register all the builtin functions, global C style functions for (size_t iFunction = 0; iFunction < m_functionCount; ++iFunction) { *************** *** 620,624 **** //lua_rawset(L, tableOffset); ! // install the definitions for (size_t iDefine = 0; iDefine < m_defineCount; ++iDefine) { --- 626,630 ---- //lua_rawset(L, tableOffset); ! // install the numerical definitions for (size_t iDefine = 0; iDefine < m_defineCount; ++iDefine) { *************** *** 647,654 **** else wxlState.tpushusertag(*pObject->pObjPtr, *pObject->objClassTag); lua_rawset(L, tableOffset); } ! // register all the event types for (size_t iEvent = 0; iEvent < m_eventCount; ++iEvent) { --- 653,661 ---- else wxlState.tpushusertag(*pObject->pObjPtr, *pObject->objClassTag); + lua_rawset(L, tableOffset); } ! // register all the wxevent types for (size_t iEvent = 0; iEvent < m_eventCount; ++iEvent) { |
From: John L. <jr...@us...> - 2006-12-01 06:25:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** wxlstate.cpp 28 Sep 2006 22:26:05 -0000 1.77 --- wxlstate.cpp 1 Dec 2006 06:25:47 -0000 1.78 *************** *** 386,404 **** // txxx functions to make lua calls easier // ---------------------------------------------------------------------------- - /* - int LUACALL wxLua_lua_tinsert(lua_State *L, int iParam) - { - wxLuaState wxlState(L); - wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); - return wxlState.tinsert(iParam); - } - - bool LUACALL wxLua_lua_tremove(lua_State *L, int iReference) - { - wxLuaState wxlState(L); - wxCHECK_MSG(wxlState.Ok(), false, wxT("Invalid wxLuaState")); - return wxlState.tremove(iReference); - } - */ bool LUACALL wxLua_lua_tget(lua_State *L, int iIndex) { --- 386,389 ---- *************** *** 533,550 **** return pdata; } - /* - int LUACALL wxLua_lua_tnewtag(lua_State *L) - { - wxLuaState wxlState(L); - wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); - return wxlState.tnewtag(); - } - int LUACALL wxLua_lua_tnewweaktag(lua_State *L, bool fWeakKey, bool fWeakData) - { - wxLuaState wxlState(L); - wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); - return wxlState.tnewweaktag(fWeakKey, fWeakData); - } - */ void LUACALL wxLua_lua_tsettag(lua_State *L, int tag) --- 518,521 ---- *************** *** 640,644 **** //case LUA_TNIL: //case LUA_TSTRING: ! case LUA_TNUMBER: return true; default: --- 611,615 ---- //case LUA_TNIL: //case LUA_TSTRING: ! case LUA_TNUMBER: // make sure it's only a number for an enum return true; default: Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** wxlbind.cpp 6 Nov 2006 06:11:44 -0000 1.41 --- wxlbind.cpp 1 Dec 2006 06:25:47 -0000 1.42 *************** *** 219,223 **** //bool tracked = false; ! if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == *pClass->class_tag)) { long key = (long)wxlState.ttouserdata(1, true); --- 219,224 ---- //bool tracked = false; ! if ((pClass != NULL) && lua_isuserdata(L, 1) && ! (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == *pClass->class_tag)) { long key = (long)wxlState.ttouserdata(1, true); *************** *** 273,277 **** // ---------------------------------------------------------------------------- ! static const char baseString[] = "base_"; int LUACALL wxLua_lua_getTableFunc(lua_State *L) --- 274,279 ---- // ---------------------------------------------------------------------------- ! #define CALL_BASECLASS_FUNC "base_" ! #define CALL_BASECLASS_FUNC_LEN 5 int LUACALL wxLua_lua_getTableFunc(lua_State *L) *************** *** 296,308 **** if ((pClass != NULL) && lua_isuserdata(L, 1) && ! (lua_islightuserdata(L, 1) == 0) && ! (wxlState.ttag(1) == *pClass->class_tag)) { void *pObject = wxlState.ttouserdata(1); ! cpIndex = lua_tostring(L, 2); - bool fCallbase = (memcmp(cpIndex, baseString, sizeof(baseString)-1) == 0); if (fCallbase) ! cpIndex += sizeof(baseString)-1; else { --- 298,311 ---- if ((pClass != NULL) && lua_isuserdata(L, 1) && ! (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == *pClass->class_tag)) { void *pObject = wxlState.ttouserdata(1); ! wxCharBuffer funcName(lua_tostring(L, 2)); // make a copy of the string ! cpIndex = funcName.data(); ! ! bool fCallbase = (memcmp(cpIndex, CALL_BASECLASS_FUNC, CALL_BASECLASS_FUNC_LEN) == 0); if (fCallbase) ! cpIndex += CALL_BASECLASS_FUNC_LEN; // skip past "base_" else { *************** *** 445,461 **** IMPLEMENT_DYNAMIC_CLASS(wxLuaBinding, wxObject) ! wxLuaBindingList wxLuaBinding::sm_bindings; wxLuaBinding::wxLuaBinding() : wxObject(), ! pfGetClassList(NULL), ! pfGetDefineList(NULL), ! pfGetEventList(NULL), ! pfGetObjectList(NULL), ! pfGetBuiltinList(NULL), ! m_classCount(0), m_classList(NULL), ! m_defineCount(0), m_defineList(NULL), ! m_eventCount(0), m_eventList(NULL), ! m_objectCount(0), m_objectList(NULL), ! m_builtinCount(0), m_builtinList(NULL), m_typesRegistered(false), m_startTag(0), --- 448,459 ---- IMPLEMENT_DYNAMIC_CLASS(wxLuaBinding, wxObject) ! wxLuaBindingList wxLuaBinding::sm_bindingList; wxLuaBinding::wxLuaBinding() : wxObject(), ! m_classCount(0), m_classList(NULL), ! m_defineCount(0), m_defineList(NULL), ! m_eventCount(0), m_eventList(NULL), ! m_objectCount(0), m_objectList(NULL), ! m_functionCount(0), m_functionList(NULL), m_typesRegistered(false), m_startTag(0), *************** *** 465,478 **** } - void wxLuaBinding::Initialize() - { - m_classList = (*pfGetClassList)(m_classCount); - m_defineList = (*pfGetDefineList)(m_defineCount); - m_stringList = (*pfGetStringList)(m_stringCount); - m_eventList = (*pfGetEventList)(m_eventCount); - m_objectList = (*pfGetObjectList)(m_objectCount); - m_builtinList = (*pfGetBuiltinList)(m_builtinCount); - } - void wxLuaBinding::RegisterBinding(const wxLuaState& wxlState, bool registerTypes) { --- 463,466 ---- *************** *** 506,510 **** --- 494,500 ---- int LUACALL wxLuaBinding::RegisterFunctions(const wxLuaState& wxlState_, bool registerTypes) { + wxCHECK_MSG(wxlState_.Ok(), 0, wxT("Invalid wxLuaState")); wxLuaState wxlState(wxlState_); + if (!registerTypes && !m_typesRegistered) wxlState.terror("wxLua: First time registration must register types"); *************** *** 576,579 **** --- 566,570 ---- static const size_t s_funcCount = sizeof(s_funcTable)/sizeof(s_funcTable[0]); + wxCHECK_RET(wxlState_.Ok(), wxT("Invalid wxLuaState")); wxLuaState wxlState(wxlState_); lua_State *L = wxlState.GetLuaState(); *************** *** 612,618 **** // register all the builtin functions ! for (size_t iBuiltin = 0; iBuiltin < m_builtinCount; ++iBuiltin) { ! WXLUAMETHOD *pMethod = m_builtinList + iBuiltin; lua_pushstring(L, pMethod->name); lua_pushcfunction(L, pMethod->func); --- 603,609 ---- // register all the builtin functions ! for (size_t iFunction = 0; iFunction < m_functionCount; ++iFunction) { ! WXLUAMETHOD *pMethod = m_functionList + iFunction; lua_pushstring(L, pMethod->name); lua_pushcfunction(L, pMethod->func); *************** *** 620,631 **** } ! // for backward compatibility ! lua_pushliteral(L, "FALSE"); ! lua_pushboolean(L, false); ! lua_rawset(L, tableOffset); ! lua_pushliteral(L, "TRUE"); ! lua_pushboolean(L, true); ! lua_rawset(L, tableOffset); // install the definitions --- 611,622 ---- } ! // for backward compatibility - removed, lua has bool now ! //lua_pushliteral(L, "FALSE"); ! //lua_pushboolean(L, false); ! //lua_rawset(L, tableOffset); ! //lua_pushliteral(L, "TRUE"); ! //lua_pushboolean(L, true); ! //lua_rawset(L, tableOffset); // install the definitions |
From: John L. <jr...@us...> - 2006-12-01 06:25:50
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/modules/wxluasocket/src Modified Files: wxluasocket_bind.cpp Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxluasocket_bind.cpp 5 Oct 2006 05:10:47 -0000 1.7 --- wxluasocket_bind.cpp 1 Dec 2006 06:25:47 -0000 1.8 *************** *** 156,166 **** { m_nameSpace = wxT("wx"); ! pfGetClassList = wxLuaGetClassList_wxluasocket; ! pfGetDefineList = wxLuaGetDefineList_wxluasocket; ! pfGetStringList = wxLuaGetStringList_wxluasocket; ! pfGetEventList = wxLuaGetEventList_wxluasocket; ! pfGetObjectList = wxLuaGetObjectList_wxluasocket; ! pfGetBuiltinList = wxLuaGetFunctionList_wxluasocket; ! Initialize(); } --- 156,165 ---- { m_nameSpace = wxT("wx"); ! m_classList = wxLuaGetClassList_wxluasocket(m_classCount); ! m_defineList = wxLuaGetDefineList_wxluasocket(m_defineCount); ! m_stringList = wxLuaGetStringList_wxluasocket(m_stringCount); ! m_eventList = wxLuaGetEventList_wxluasocket(m_eventCount); ! m_objectList = wxLuaGetObjectList_wxluasocket(m_objectCount); ! m_functionList = wxLuaGetFunctionList_wxluasocket(m_functionCount); } |
From: John L. <jr...@us...> - 2006-12-01 06:25:50
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/modules/wxlua/include Modified Files: wxlbind.h Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxlbind.h 6 Nov 2006 06:11:44 -0000 1.25 --- wxlbind.h 1 Dec 2006 06:25:47 -0000 1.26 *************** *** 22,25 **** --- 22,29 ---- } + #ifdef GetObject + #undef GetObject + #endif + class WXDLLIMPEXP_WXLUA wxLuaBinding; class WXDLLIMPEXP_WXLUA wxLuaState; *************** *** 113,123 **** }; - typedef WXLUACLASS* (*wxLuaGetClassListFunction)(size_t &); - typedef WXLUADEFINE* (*wxLuaGetDefineListFunction)(size_t &); - typedef WXLUASTRING* (*wxLuaGetStringListFunction)(size_t &); - typedef WXLUAEVENT* (*wxLuaGetEventListFunction)(size_t &); - typedef WXLUAOBJECT* (*wxLuaGetObjectListFunction)(size_t &); - typedef WXLUAMETHOD* (*wxLuaGetBuiltinListFunction)(size_t &); - // ---------------------------------------------------------------------------- // wxLuaFunction - a proxy class to store a reference to a Lua function. --- 117,120 ---- *************** *** 156,163 **** // ---------------------------------------------------------------------------- - #ifdef GetObject - #undef GetObject - #endif - enum wxLuaObject_Type { --- 153,156 ---- *************** *** 224,228 **** // ---------------------------------------------------------------------------- ! #define WXLUA_NO_DLLIMPEXP // use if you don't want to export #define WXLUA_NO_DLLIMPEXP_DATA(x) x // use if you don't want to export data --- 217,221 ---- // ---------------------------------------------------------------------------- ! #define WXLUA_NO_DLLIMPEXP // use if you don't want to export class #define WXLUA_NO_DLLIMPEXP_DATA(x) x // use if you don't want to export data *************** *** 233,237 **** { \ public: \ ! wxObject_##objName(className *p_##objName); \ ~wxObject_##objName(); \ private: \ --- 226,230 ---- { \ public: \ ! wxObject_##objName(className *p_##objName) : m_p##objName(p_##objName) {} \ ~wxObject_##objName(); \ private: \ *************** *** 242,252 **** #define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \ IMPLEMENT_ABSTRACT_CLASS(wxObject_##objName, wxObject) \ - wxObject_##objName::wxObject_##objName(className *p##objName) \ - :m_p##objName(p##objName) {} \ - \ wxObject_##objName::~wxObject_##objName() \ { \ ! if (m_p##objName != NULL) \ ! delete m_p##objName; \ } \ void LUACALL wxLua_AddToTrackedMemoryList(wxLuaState& wxlState, className *p##objName) \ --- 235,241 ---- #define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \ IMPLEMENT_ABSTRACT_CLASS(wxObject_##objName, wxObject) \ wxObject_##objName::~wxObject_##objName() \ { \ ! if (m_p##objName != NULL) delete m_p##objName; \ } \ void LUACALL wxLua_AddToTrackedMemoryList(wxLuaState& wxlState, className *p##objName) \ *************** *** 308,325 **** virtual ~wxLuaBinding() {} - // Initialize the binding members from the binding functions - // automatically called in generated binding code - void Initialize(); // override this to generate a "new" version of subclassed bindings virtual wxLuaBinding* Clone() const { return new wxLuaBinding; } - // Pointers to external Binding Functions (use accessors below) - wxLuaGetClassListFunction pfGetClassList; - wxLuaGetDefineListFunction pfGetDefineList; - wxLuaGetStringListFunction pfGetStringList; - wxLuaGetEventListFunction pfGetEventList; - wxLuaGetObjectListFunction pfGetObjectList; - wxLuaGetBuiltinListFunction pfGetBuiltinList; - // Binds C Functions/Defines/Object/Events to namespace Lua Table virtual void RegisterBinding(const wxLuaState& wxlState, bool registerTypes); --- 297,303 ---- *************** *** 346,355 **** WXLUAOBJECT* GetLuaObjectList() { return m_objectList; } ! size_t GetLuaBuiltinCount() { return m_builtinCount; } ! WXLUAMETHOD* GetLuaBuiltinList() { return m_builtinList; } bool IsTag(int tag) { return (tag >= m_startTag) && (tag <= m_lastTag); } ! // Look for base class in binding, set baseclass_tag bool SetBaseClassTag(WXLUACLASS *pClass); --- 324,334 ---- WXLUAOBJECT* GetLuaObjectList() { return m_objectList; } ! size_t GetLuaFunctionCount() { return m_functionCount; } ! WXLUAMETHOD* GetLuaFunctionList() { return m_functionList; } bool IsTag(int tag) { return (tag >= m_startTag) && (tag <= m_lastTag); } ! // Look for the base class of the input WXLUACLASS in this binding and if ! // found, set the tag of the baseclass_tag member of the input. bool SetBaseClassTag(WXLUACLASS *pClass); *************** *** 358,363 **** wxString GetEventTypeName(wxEventType e_type); ! // Get all the bindings that were created ! static wxLuaBindingList* GetBindingList() { return &sm_bindings; } protected: --- 337,345 ---- wxString GetEventTypeName(wxEventType e_type); ! // Get all the bindings that were initialized using the generated binding ! // function wxLuaBinding_[binding name]_init(). ! // You can adjust the list *only* if you do not have any wxLuaStates ! // created, otherwise the tags will be out of sync. ! static wxLuaBindingList* GetBindingList() { return &sm_bindingList; } protected: *************** *** 382,389 **** size_t m_objectCount; WXLUAOBJECT* m_objectList; ! size_t m_builtinCount; ! WXLUAMETHOD* m_builtinList; ! wxString m_nameSpace; // lua namespace e.g. "wx" bool m_typesRegistered; // Is the binding registered int m_startTag; // The first wxLua allocated lua tag --- 364,371 ---- size_t m_objectCount; WXLUAOBJECT* m_objectList; ! size_t m_functionCount; ! WXLUAMETHOD* m_functionList; ! wxString m_nameSpace; // lua table namespace e.g. "wx" bool m_typesRegistered; // Is the binding registered int m_startTag; // The first wxLua allocated lua tag *************** *** 391,395 **** int m_wxLuaTable; // The lua tag for the wxLua private tables ! static wxLuaBindingList sm_bindings; DECLARE_DYNAMIC_CLASS(wxLuaBinding) --- 373,377 ---- int m_wxLuaTable; // The lua tag for the wxLua private tables ! static wxLuaBindingList sm_bindingList; DECLARE_DYNAMIC_CLASS(wxLuaBinding) |
From: John L. <jr...@us...> - 2006-12-01 06:25:50
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/modules/wxbind/src Modified Files: wx_bind.cpp Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** wx_bind.cpp 22 Nov 2006 21:13:56 -0000 1.62 --- wx_bind.cpp 1 Dec 2006 06:25:46 -0000 1.63 *************** *** 6296,6306 **** { m_nameSpace = wxT("wx"); ! pfGetClassList = wxLuaGetClassList_wx; ! pfGetDefineList = wxLuaGetDefineList_wx; ! pfGetStringList = wxLuaGetStringList_wx; ! pfGetEventList = wxLuaGetEventList_wx; ! pfGetObjectList = wxLuaGetObjectList_wx; ! pfGetBuiltinList = wxLuaGetFunctionList_wx; ! Initialize(); } --- 6296,6305 ---- { m_nameSpace = wxT("wx"); ! m_classList = wxLuaGetClassList_wx(m_classCount); ! m_defineList = wxLuaGetDefineList_wx(m_defineCount); ! m_stringList = wxLuaGetStringList_wx(m_stringCount); ! m_eventList = wxLuaGetEventList_wx(m_eventCount); ! m_objectList = wxLuaGetObjectList_wx(m_objectCount); ! m_functionList = wxLuaGetFunctionList_wx(m_functionCount); } |
From: John L. <jr...@us...> - 2006-12-01 06:25:50
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/modules/wxbindstc/src Modified Files: wxstc_bind.cpp Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: wxstc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/wxstc_bind.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxstc_bind.cpp 26 Sep 2006 05:05:55 -0000 1.12 --- wxstc_bind.cpp 1 Dec 2006 06:25:47 -0000 1.13 *************** *** 1476,1486 **** { m_nameSpace = wxT("wx"); ! pfGetClassList = wxLuaGetClassList_wxstc; ! pfGetDefineList = wxLuaGetDefineList_wxstc; ! pfGetStringList = wxLuaGetStringList_wxstc; ! pfGetEventList = wxLuaGetEventList_wxstc; ! pfGetObjectList = wxLuaGetObjectList_wxstc; ! pfGetBuiltinList = wxLuaGetFunctionList_wxstc; ! Initialize(); } --- 1476,1485 ---- { m_nameSpace = wxT("wx"); ! m_classList = wxLuaGetClassList_wxstc(m_classCount); ! m_defineList = wxLuaGetDefineList_wxstc(m_defineCount); ! m_stringList = wxLuaGetStringList_wxstc(m_stringCount); ! m_eventList = wxLuaGetEventList_wxstc(m_eventCount); ! m_objectList = wxLuaGetObjectList_wxstc(m_objectCount); ! m_functionList = wxLuaGetFunctionList_wxstc(m_functionCount); } |
From: John L. <jr...@us...> - 2006-12-01 06:25:50
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/bindings/wxstc Modified Files: wxstc_datatypes.lua Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: wxstc_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_datatypes.lua,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wxstc_datatypes.lua 2 Nov 2006 23:38:08 -0000 1.34 --- wxstc_datatypes.lua 1 Dec 2006 06:25:46 -0000 1.35 *************** *** 13,17 **** WXHANDLE = "void *", WXWidget = "unsigned long", - luaObject = "lua_State *", ["wxDateTime::wxDateTime_t"] = "unsigned short", wxDouble = "double", --- 13,16 ---- *************** *** 1798,1802 **** }, wxLog = { ! Condition = "(wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxApp)", DefType = "class", Intrinsic = false, --- 1797,1801 ---- }, wxLog = { ! Condition = "(wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || (defined(WXWIN_COMPATIBILITY_2_4) && WXWIN_COMPATIBILITY_2_4)) && (wxUSE_LOG) && (wxLUA_USE_wxApp)", DefType = "class", Intrinsic = false, *************** *** 1823,1826 **** --- 1822,1830 ---- Name = "wxLuaObject", }, + wxLuaObject_Type = { + DefType = "enum", + Intrinsic = true, + Name = "wxLuaObject_Type", + }, wxLuaPrintout = { BaseClass = "wxPrintout", *************** *** 3298,3312 **** ["%wxchkver272"] = "wxCHECK_VERSION(2,7,2)", ["%wxchkver28"] = "wxCHECK_VERSION(2,8,0)", ! ["%wxcompat20"] = "WXWIN_COMPATIBILITY_2", ! ["%wxcompat22"] = "WXWIN_COMPATIBILITY_2_2", ! ["%wxcompat24"] = "WXWIN_COMPATIBILITY_2_4", ! ["%wxcompat26"] = "WXWIN_COMPATIBILITY_2_6", ! ["%wxcompat28"] = "WXWIN_COMPATIBILITY_2_8", ["%x11"] = "defined(__WXX11__)", ! WXWIN_COMPATIBILITY_2 = "WXWIN_COMPATIBILITY_2", ! WXWIN_COMPATIBILITY_2_2 = "WXWIN_COMPATIBILITY_2_2", ! WXWIN_COMPATIBILITY_2_4 = "WXWIN_COMPATIBILITY_2_4", ! WXWIN_COMPATIBILITY_2_6 = "WXWIN_COMPATIBILITY_2_6", ! WXWIN_COMPATIBILITY_2_8 = "WXWIN_COMPATIBILITY_2_8", wxLUA_USE_FL = "wxLUA_USE_FL", wxLUA_USE_Geometry = "wxLUA_USE_Geometry", --- 3302,3318 ---- ["%wxchkver272"] = "wxCHECK_VERSION(2,7,2)", ["%wxchkver28"] = "wxCHECK_VERSION(2,8,0)", ! ["%wxchkver_2_2"] = "wxCHECK_VERSION(2,2,0)", ! ["%wxchkver_2_5"] = "wxCHECK_VERSION(2,5,0)", ! ["%wxcompat20"] = "(defined(WXWIN_COMPATIBILITY_2) && WXWIN_COMPATIBILITY_2)", ! ["%wxcompat22"] = "(defined(WXWIN_COMPATIBILITY_2_2) && WXWIN_COMPATIBILITY_2_2)", ! ["%wxcompat24"] = "(defined(WXWIN_COMPATIBILITY_2_4) && WXWIN_COMPATIBILITY_2_4)", ! ["%wxcompat26"] = "(defined(WXWIN_COMPATIBILITY_2_6) && WXWIN_COMPATIBILITY_2_6)", ! ["%wxcompat28"] = "(defined(WXWIN_COMPATIBILITY_2_8) && WXWIN_COMPATIBILITY_2_8)", ["%x11"] = "defined(__WXX11__)", ! WXWIN_COMPATIBILITY_2 = "(defined(WXWIN_COMPATIBILITY_2) && WXWIN_COMPATIBILITY_2)", ! WXWIN_COMPATIBILITY_2_2 = "(defined(WXWIN_COMPATIBILITY_2_2) && WXWIN_COMPATIBILITY_2_2)", ! WXWIN_COMPATIBILITY_2_4 = "(defined(WXWIN_COMPATIBILITY_2_4) && WXWIN_COMPATIBILITY_2_4)", ! WXWIN_COMPATIBILITY_2_6 = "(defined(WXWIN_COMPATIBILITY_2_6) && WXWIN_COMPATIBILITY_2_6)", ! WXWIN_COMPATIBILITY_2_8 = "(defined(WXWIN_COMPATIBILITY_2_8) && WXWIN_COMPATIBILITY_2_8)", wxLUA_USE_FL = "wxLUA_USE_FL", wxLUA_USE_Geometry = "wxLUA_USE_Geometry", *************** *** 3343,3349 **** --- 3349,3357 ---- wxLUA_USE_wxDateSpan = "wxLUA_USE_wxDateSpan", wxLUA_USE_wxDateTime = "wxLUA_USE_wxDateTime", + wxLUA_USE_wxDateTimeHolidayAuthority = "wxLUA_USE_wxDateTimeHolidayAuthority", wxLUA_USE_wxDialog = "wxLUA_USE_wxDialog", wxLUA_USE_wxDir = "wxLUA_USE_wxDir", wxLUA_USE_wxDirDialog = "wxLUA_USE_wxDirDialog", + wxLUA_USE_wxDisplay = "wxLUA_USE_wxDisplay", wxLUA_USE_wxDragDrop = "wxLUA_USE_wxDragDrop", wxLUA_USE_wxFile = "wxLUA_USE_wxFile", *************** *** 3598,3601 **** --- 3606,3610 ---- wxUSE_UXTHEME_AUTO = "wxUSE_UXTHEME_AUTO", wxUSE_VALIDATORS = "wxUSE_VALIDATORS", + wxUSE_WAVE = "wxUSE_WAVE", wxUSE_WCHAR_T = "wxUSE_WCHAR_T", wxUSE_WCSRTOMBS = "wxUSE_WCSRTOMBS", |
From: John L. <jr...@us...> - 2006-12-01 06:25:50
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/bindings/wxwidgets Modified Files: appframe.i Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** appframe.i 22 Nov 2006 21:13:56 -0000 1.22 --- appframe.i 1 Dec 2006 06:25:46 -0000 1.23 *************** *** 149,152 **** --- 149,153 ---- %define wxSIMPLE_BORDER %define wxRESIZE_BORDER + %define wxFRAME_TOOL_WINDOW %wxchkver23 %define wxFRAME_NO_TASKBAR |
From: John L. <jr...@us...> - 2006-12-01 06:25:49
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/bindings Modified Files: genwxbind.lua Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** genwxbind.lua 30 Nov 2006 05:56:30 -0000 1.83 --- genwxbind.lua 1 Dec 2006 06:25:46 -0000 1.84 *************** *** 4269,4279 **** table.insert(fileData, "{\n") table.insert(fileData, " m_nameSpace = wxT(\""..hook_lua_namespace.."\");\n") ! table.insert(fileData, " pfGetClassList = "..hook_cpp_class_funcname..";\n") ! table.insert(fileData, " pfGetDefineList = "..hook_cpp_define_funcname..";\n") ! table.insert(fileData, " pfGetStringList = "..hook_cpp_string_funcname..";\n") ! table.insert(fileData, " pfGetEventList = "..hook_cpp_event_funcname..";\n") ! table.insert(fileData, " pfGetObjectList = "..hook_cpp_object_funcname..";\n") ! table.insert(fileData, " pfGetBuiltinList = "..hook_cpp_function_funcname..";\n") ! table.insert(fileData, " Initialize();\n") table.insert(fileData, "}\n") table.insert(fileData, "\n") --- 4269,4278 ---- table.insert(fileData, "{\n") table.insert(fileData, " m_nameSpace = wxT(\""..hook_lua_namespace.."\");\n") ! table.insert(fileData, " m_classList = "..hook_cpp_class_funcname.."(m_classCount);\n") ! table.insert(fileData, " m_defineList = "..hook_cpp_define_funcname.."(m_defineCount);\n") ! table.insert(fileData, " m_stringList = "..hook_cpp_string_funcname.."(m_stringCount);\n") ! table.insert(fileData, " m_eventList = "..hook_cpp_event_funcname.."(m_eventCount);\n") ! table.insert(fileData, " m_objectList = "..hook_cpp_object_funcname.."(m_objectCount);\n") ! table.insert(fileData, " m_functionList = "..hook_cpp_function_funcname.."(m_functionCount);\n") table.insert(fileData, "}\n") table.insert(fileData, "\n") |
From: John L. <jr...@us...> - 2006-12-01 06:25:49
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/apps/wxluacan/src Modified Files: wxluacan_bind.cpp Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: wxluacan_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_bind.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxluacan_bind.cpp 28 Aug 2006 05:26:19 -0000 1.8 --- wxluacan_bind.cpp 1 Dec 2006 06:25:45 -0000 1.9 *************** *** 181,191 **** { m_nameSpace = wxT("wxluacan"); ! pfGetClassList = wxLuaGetClassList_wxluacan; ! pfGetDefineList = wxLuaGetDefineList_wxluacan; ! pfGetStringList = wxLuaGetStringList_wxluacan; ! pfGetEventList = wxLuaGetEventList_wxluacan; ! pfGetObjectList = wxLuaGetObjectList_wxluacan; ! pfGetBuiltinList = wxLuaGetFunctionList_wxluacan; ! Initialize(); } --- 181,190 ---- { m_nameSpace = wxT("wxluacan"); ! m_classList = wxLuaGetClassList_wxluacan(m_classCount); ! m_defineList = wxLuaGetDefineList_wxluacan(m_defineCount); ! m_stringList = wxLuaGetStringList_wxluacan(m_stringCount); ! m_eventList = wxLuaGetEventList_wxluacan(m_eventCount); ! m_objectList = wxLuaGetObjectList_wxluacan(m_objectCount); ! m_functionList = wxLuaGetFunctionList_wxluacan(m_functionCount); } |
From: John L. <jr...@us...> - 2006-11-30 05:56:35
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6079/wxLua/modules/wxbind/src Modified Files: gdi.cpp Log Message: fix wxBitmapFromFile constructor some cleanup to genwxbind Index: gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/gdi.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** gdi.cpp 22 Nov 2006 06:08:33 -0000 1.34 --- gdi.cpp 30 Nov 2006 05:56:31 -0000 1.35 *************** *** 5703,5713 **** } ! // %constructor wxBitmapFromFile( const wxString& name, long type) static int LUACALL wxLua_wxBitmapFromFile_constructor(lua_State *L) { wxLuaState wxlState(L); wxBitmap *returns; ! // long type ! long type = (long)wxlState.GetNumberType(2); // const wxString name const wxString name = lua2wx(wxlState.GetStringType(1)); --- 5703,5715 ---- } ! // %constructor wxBitmapFromFile(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_ANY) static int LUACALL wxLua_wxBitmapFromFile_constructor(lua_State *L) { wxLuaState wxlState(L); wxBitmap *returns; ! // get number of arguments ! int argCount = lua_gettop(L); ! // wxBitmapType type = wxBITMAP_TYPE_ANY ! wxBitmapType type = (argCount >= 2 ? (wxBitmapType)wxlState.GetEnumerationType(2) : wxBITMAP_TYPE_ANY); // const wxString name const wxString name = lua2wx(wxlState.GetStringType(1)); *************** *** 5978,5982 **** { LuaConstructor, "wxBitmapCopy", wxLua_wxBitmapCopy_constructor, 1, 1, { &s_wxluatag_wxBitmap, 0 } }, { LuaConstructor, "wxEmptyBitmap", wxLua_wxEmptyBitmap_constructor, 3, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, ! { LuaConstructor, "wxBitmapFromFile", wxLua_wxBitmapFromFile_constructor, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, { LuaConstructor, "wxBitmapFromXPMData", wxLua_wxBitmapFromXPMData_constructor, 1, 1, { &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "Create", wxLua_wxBitmap_Create, 3, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, --- 5980,5984 ---- { LuaConstructor, "wxBitmapCopy", wxLua_wxBitmapCopy_constructor, 1, 1, { &s_wxluatag_wxBitmap, 0 } }, { LuaConstructor, "wxEmptyBitmap", wxLua_wxEmptyBitmap_constructor, 3, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, ! { LuaConstructor, "wxBitmapFromFile", wxLua_wxBitmapFromFile_constructor, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Enumeration, 0 } }, { LuaConstructor, "wxBitmapFromXPMData", wxLua_wxBitmapFromXPMData_constructor, 1, 1, { &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "Create", wxLua_wxBitmap_Create, 3, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, |