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...> - 2005-11-29 05:45:18
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/modules/wxluadebug/include Modified Files: splttree.h staktree.h wxldebug.h Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: staktree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/staktree.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** staktree.h 25 Nov 2005 02:43:02 -0000 1.4 --- staktree.h 29 Nov 2005 05:45:10 -0000 1.5 *************** *** 24,27 **** --- 24,41 ---- // ---------------------------------------------------------------------------- + // constants + // ---------------------------------------------------------------------------- + + #define ID_WXLUA_STACKFRAME 2000 + #define ID_WXLUA_STACKFRAME_COMBO 2001 + #define ID_WXLUA_STACKFRAME_SCRWIN 2002 + #define ID_WXLUA_STACKFRAME_SPLITWIN 2003 + #define ID_WXLUA_STACKFRAME_STACKTREE 2004 + #define ID_WXLUA_STACKFRAME_VALUE_SPLITWIN 2005 + #define ID_WXLUA_STACKFRAME_VALUE_WIN1 2006 + #define ID_WXLUA_STACKFRAME_VALUE_WIN2 2007 + #define ID_WXLUA_STACKFRAME_DISMISS_BUTTON 2008 + + // ---------------------------------------------------------------------------- // wxLuaStackFrame // ---------------------------------------------------------------------------- *************** *** 75,116 **** int m_nCurrentSel; - DECLARE_EVENT_TABLE() - private: - friend class wxLuaStackDataWindow; }; // ---------------------------------------------------------------------------- - // constants - // ---------------------------------------------------------------------------- - - #define idSTACK_FRAME 2000 - #define idSTACK_COMBOBOX 2001 - #define idSCROLLED_WINDOW 2002 - #define idSPLITTER_WINDOW 2003 - #define idSTACKTREE_CTRL 2004 - #define idVALUE_SPLITTER_WINDOW 2005 - #define idFIRST_VALUE_WINDOW 2006 - #define idSECOND_VALUE_WINDOW 2007 - #define idDISMISS_BUTTON 2008 - - // ---------------------------------------------------------------------------- // wxLuaStackTree // ---------------------------------------------------------------------------- ! class wxLuaStackTree : public wxRemotelyScrolledTreeCtrl { - DECLARE_CLASS(wxLuaStackTree) public: wxLuaStackTree( wxWindow *parent, ! wxWindowID id, const wxPoint &pt = wxDefaultPosition, const wxSize &sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS); virtual ~wxLuaStackTree(); private: wxImageList* m_imageList; DECLARE_EVENT_TABLE() }; --- 89,116 ---- int m_nCurrentSel; private: friend class wxLuaStackDataWindow; + DECLARE_ABSTRACT_CLASS(wxLuaStackFrame) + DECLARE_EVENT_TABLE() }; // ---------------------------------------------------------------------------- // wxLuaStackTree // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUA wxLuaStackTree : public wxRemotelyScrolledTreeCtrl { public: wxLuaStackTree( wxWindow *parent, ! wxWindowID id = wxID_ANY, const wxPoint &pt = wxDefaultPosition, const wxSize &sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS); + virtual ~wxLuaStackTree(); private: wxImageList* m_imageList; + DECLARE_ABSTRACT_CLASS(wxLuaStackTree) DECLARE_EVENT_TABLE() }; *************** *** 119,123 **** // wxLuaStackDataWindow // ---------------------------------------------------------------------------- ! class wxLuaStackDataWindow : public wxTreeCompanionWindow { public: --- 119,124 ---- // wxLuaStackDataWindow // ---------------------------------------------------------------------------- ! ! class WXDLLIMPEXP_WXLUA wxLuaStackDataWindow : public wxTreeCompanionWindow { public: *************** *** 134,137 **** --- 135,139 ---- private: bool m_fFirst; + DECLARE_ABSTRACT_CLASS(wxLuaStackDataWindow) DECLARE_EVENT_TABLE() }; Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxldebug.h 26 Nov 2005 08:46:57 -0000 1.3 --- wxldebug.h 29 Nov 2005 05:45:10 -0000 1.4 *************** *** 52,56 **** wxString m_fileName; wxString m_buffer; ! DECLARE_CLASS(wxLuaBuffer) }; --- 52,56 ---- wxString m_fileName; wxString m_buffer; ! DECLARE_ABSTRACT_CLASS(wxLuaBuffer) }; *************** *** 235,239 **** private: ! DECLARE_CLASS(wxLuaDebuggerBase) }; --- 235,239 ---- private: ! DECLARE_ABSTRACT_CLASS(wxLuaDebuggerBase) }; Index: splttree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/splttree.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** splttree.h 25 Nov 2005 02:43:02 -0000 1.3 --- splttree.h 29 Nov 2005 05:45:10 -0000 1.4 *************** *** 45,49 **** const wxSize &sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS); ! ~wxRemotelyScrolledTreeCtrl(); //// Events --- 45,49 ---- const wxSize &sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS); ! virtual ~wxRemotelyScrolledTreeCtrl(); //// Events *************** *** 117,121 **** } - DECLARE_EVENT_TABLE() protected: wxWindow *m_firstCompanionWindow; --- 117,120 ---- *************** *** 123,128 **** bool m_drawRowLines; wxTreeItemId &m_lastTreeItemId; private: ! DECLARE_CLASS(wxRemotelyScrolledTreeCtrl) }; --- 122,129 ---- bool m_drawRowLines; wxTreeItemId &m_lastTreeItemId; + private: ! DECLARE_ABSTRACT_CLASS(wxRemotelyScrolledTreeCtrl) ! DECLARE_EVENT_TABLE() }; *************** *** 136,148 **** { public: - DECLARE_CLASS(wxTreeCompanionWindow) - wxTreeCompanionWindow(wxWindow* parent, ! wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = 0); ! ~wxTreeCompanionWindow(); //// Overrides --- 137,147 ---- { public: wxTreeCompanionWindow(wxWindow* parent, ! wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = 0); ! virtual ~wxTreeCompanionWindow(); //// Overrides *************** *** 155,160 **** void OnSelChanged(wxTreeEvent& event); - //// Operations - //// Accessors wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const --- 154,157 ---- *************** *** 172,175 **** --- 169,174 ---- wxRemotelyScrolledTreeCtrl *m_treeControl; + private: + DECLARE_ABSTRACT_CLASS(wxTreeCompanionWindow) DECLARE_EVENT_TABLE() }; *************** *** 186,193 **** { public: - DECLARE_DYNAMIC_CLASS(wxThinSplitterWindow) - wxThinSplitterWindow(wxWindow* parent, ! wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, --- 185,190 ---- { public: wxThinSplitterWindow(wxWindow* parent, ! wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, *************** *** 206,215 **** void OnSize(wxSizeEvent& event); - //// Operations - - //// Accessors - - //// Data members protected: DECLARE_EVENT_TABLE() }; --- 203,208 ---- void OnSize(wxSizeEvent& event); protected: + DECLARE_ABSTRACT_CLASS(wxThinSplitterWindow) DECLARE_EVENT_TABLE() }; *************** *** 224,240 **** */ ! class wxSplitterScrolledWindow: public wxScrolledWindow { public: - DECLARE_DYNAMIC_CLASS(wxSplitterScrolledWindow) - wxSplitterScrolledWindow(wxWindow* parent, ! wxWindowID id = -1, const wxPoint &pos = wxDefaultPosition, const wxSize &sz = wxDefaultSize, long style = 0); - //// Overrides - //// Events --- 217,229 ---- */ ! class WXDLLIMPEXP_WXLUA wxSplitterScrolledWindow: public wxScrolledWindow { public: wxSplitterScrolledWindow(wxWindow* parent, ! wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &sz = wxDefaultSize, long style = 0); //// Events *************** *** 242,254 **** void OnSize(wxSizeEvent& event); ! //// Operations ! ! //// Accessors ! ! //// Data members ! public: DECLARE_EVENT_TABLE() }; ! #endif ! // _SPLITTREE_H_ --- 231,238 ---- void OnSize(wxSizeEvent& event); ! private: ! DECLARE_ABSTRACT_CLASS(wxSplitterScrolledWindow) DECLARE_EVENT_TABLE() }; ! #endif // _SPLITTREE_H_ |
From: John L. <jr...@us...> - 2005-11-29 05:45:18
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/apps/wxlua/src Modified Files: Makefile lconsole.cpp lconsole.h wxlua.h Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile 25 Nov 2005 02:43:01 -0000 1.7 --- Makefile 29 Nov 2005 05:45:09 -0000 1.8 *************** *** 26,30 **** WXCXXFLAGS = $(shell $(WXCONFIG) --cxxflags) WXLDLIBS = $(shell $(WXCONFIG) --libs) ! WXCXX = $(shell $(WXCONFIG) --cxx) WXLIB_DIR = $(WXPREFIX)/lib # ---------------------------------------------------------------------------- --- 26,30 ---- WXCXXFLAGS = $(shell $(WXCONFIG) --cxxflags) WXLDLIBS = $(shell $(WXCONFIG) --libs) ! WXCXX = $(shell $(WXCONFIG) --cxx) WXLIB_DIR = $(WXPREFIX)/lib # ---------------------------------------------------------------------------- *************** *** 36,40 **** PROGRAM = wxLua ! LUA_LIBS = $(WXLUA_DIR)/lib/liblua.a $(WXLUA_DIR)/lib/liblualib.a WXLUA_LIB = $(WXBASENAME)_wxlua-$(WXRELEASE) WXLUADEBUG_LIB = $(WXBASENAME)_wxluadebug-$(WXRELEASE) --- 36,40 ---- PROGRAM = wxLua ! LUA_LIBS = $(WXLUA_DIR)/lib/liblua.a $(WXLUA_DIR)/lib/liblualib.a WXLUA_LIB = $(WXBASENAME)_wxlua-$(WXRELEASE) WXLUADEBUG_LIB = $(WXBASENAME)_wxluadebug-$(WXRELEASE) *************** *** 52,56 **** # This will build a shared wxLua app, dynamicly linked to .so libs # -l$(WXFL_LIB) ! APPEXTRALIBS=-L$(WXLIB_DIR) -L$(WXLUA_LIBDIR) -l$(WXLUA_LIB) -l$(WXLUADEBUG_LIB) -l$(WXLUASOCKET_LIB) -l$(WXSTC_LIB) -l$(WXXRC_LIB) $(LUA_LIBS) -l$(WXLUABIND_LIB) OBJECTS=wxlua.o --- 52,56 ---- # This will build a shared wxLua app, dynamicly linked to .so libs # -l$(WXFL_LIB) ! APPEXTRALIBS=-L$(WXLIB_DIR) -L$(WXLUA_LIBDIR) -l$(WXSTC_LIB) -l$(WXXRC_LIB) -l$(WXLUABIND_LIB) -l$(WXLUA_LIB) -l$(WXLUADEBUG_LIB) -l$(WXLUASOCKET_LIB) $(LUA_LIBS) OBJECTS=wxlua.o *************** *** 60,72 **** $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< ! all: lua wxLuaLib wxLuaDebugLib wxLuaSocketLib wxLuaBindings $(PROGRAM) ! $(PROGRAM): $(OBJECTS) $(LUA_LIBS) wxLuaLib wxLuaDebugLib wxLuaSocketLib wxLuaBindings ! $(CXX) -o $@ $(OBJECTS) $(LDLIBS) $(APPEXTRALIBS) lua: @(cd $(WXLUA_DIR)/modules/lua && make) ! bindings: @(cd $(WXLUA_DIR)/bindings/wxwidgets && make) --- 60,72 ---- $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< ! all: lua wxLuaLib wxLuaDebugLib wxLuaSocketLib wxLuaBindings $(PROGRAM) ! $(PROGRAM): $(OBJECTS) $(LUA_LIBS) wxLuaLib wxLuaDebugLib wxLuaSocketLib wxLuaBindings ! $(CXX) -o $@ $(OBJECTS) $(LDLIBS) $(APPEXTRALIBS) lua: @(cd $(WXLUA_DIR)/modules/lua && make) ! bindings: @(cd $(WXLUA_DIR)/bindings/wxwidgets && make) Index: lconsole.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lconsole.h 7 Jun 2005 04:17:29 -0000 1.1 --- lconsole.h 29 Nov 2005 05:45:09 -0000 1.2 *************** *** 17,24 **** #include "wxlua/include/wxlua.h" ! class wxDebugPanel : public wxPanel { public: ! wxDebugPanel(wxWindow *parent, lua_State *pState); void FillListbox(); --- 17,28 ---- #include "wxlua/include/wxlua.h" ! // ---------------------------------------------------------------------------- ! // wxLuaDebugPanel ! // ---------------------------------------------------------------------------- ! ! class wxLuaDebugPanel : public wxPanel { public: ! wxLuaDebugPanel(wxWindow *parent, lua_State *pState); void FillListbox(); *************** *** 28,38 **** wxListBox *m_listBox; - DECLARE_EVENT_TABLE() - void OnSizeWindow(wxSizeEvent& event); void OnEraseBackground(wxEraseEvent& event); }; ! // define our console class class wxLuaConsole : public wxFrame { --- 32,45 ---- wxListBox *m_listBox; void OnSizeWindow(wxSizeEvent& event); void OnEraseBackground(wxEraseEvent& event); + + DECLARE_EVENT_TABLE() }; ! // ---------------------------------------------------------------------------- ! // wxLuaConsole - define our console class ! // ---------------------------------------------------------------------------- ! class wxLuaConsole : public wxFrame { *************** *** 42,47 **** private: - DECLARE_EVENT_TABLE() - void OnCloseWindow(wxCloseEvent& event); void OnEraseBackground(wxEraseEvent& event); --- 49,52 ---- *************** *** 51,57 **** wxTextCtrl *m_textCtrl; wxLuaStandaloneApp *m_pApp; ! wxDebugPanel *m_panel; bool m_fError; }; ! #endif --- 56,64 ---- wxTextCtrl *m_textCtrl; wxLuaStandaloneApp *m_pApp; ! wxLuaDebugPanel *m_panel; bool m_fError; + + DECLARE_EVENT_TABLE() }; ! #endif // WX_LUA_CONSOLE_H Index: wxlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxlua.h 26 Nov 2005 08:46:57 -0000 1.5 --- wxlua.h 29 Nov 2005 05:45:09 -0000 1.6 *************** *** 29,52 **** #include "wx/app.h" class LuaHandler; ! class wxLuaEvent; class wxLuaStandaloneApp : public wxApp { - private: - wxLuaStackFrame *m_pStackFrame; - LuaHandler *m_luaHandler; - wxLuaInterpreter *m_luaInterpreter; - lua_State *m_luaState; - #ifdef __WXMSW__ - wxLuaConsole *m_pConsole; - #endif - bool m_fMemoryBitmapAdded; - #if wxCHECK_VERSION(2, 3, 0) - LuaDebugTarget *m_pDebugTarget; - #endif - - DECLARE_EVENT_TABLE(); - public: // Override the base class virtual functions --- 29,41 ---- #include "wx/app.h" + class WXDLLIMPEXP_WXLUA wxLuaEvent; class LuaHandler; ! ! // ---------------------------------------------------------------------------- ! // wxLuaStandaloneApp ! // ---------------------------------------------------------------------------- class wxLuaStandaloneApp : public wxApp { public: // Override the base class virtual functions *************** *** 55,59 **** void DisplayError(const wxString &strError) const; ! // set the lua console #ifdef __WXMSW__ void SetLuaConsole(wxLuaConsole *pConsole) { m_pConsole = pConsole; } --- 44,48 ---- void DisplayError(const wxString &strError) const; ! // set the lua console #ifdef __WXMSW__ void SetLuaConsole(wxLuaConsole *pConsole) { m_pConsole = pConsole; } *************** *** 65,69 **** static int LUACALL PanicFunction(lua_State * /*L*/); ! // register all the classes, methods, etc. in the generated list void RegisterClasses(lua_State *L); --- 54,58 ---- static int LUACALL PanicFunction(lua_State * /*L*/); ! // register all the classes, methods, etc. in the generated list void RegisterClasses(lua_State *L); *************** *** 76,79 **** --- 65,82 ---- void OnDebugTableEnum(wxLuaDebugEvent &event); void OnDebugStackEntryEnum(wxLuaDebugEvent &event); + + wxLuaStackFrame *m_pStackFrame; + LuaHandler *m_luaHandler; + wxLuaInterpreter *m_luaInterpreter; + lua_State *m_luaState; + #ifdef __WXMSW__ + wxLuaConsole *m_pConsole; + #endif + bool m_fMemoryBitmapAdded; + #if wxCHECK_VERSION(2, 3, 0) + LuaDebugTarget *m_pDebugTarget; + #endif + + DECLARE_EVENT_TABLE(); }; Index: lconsole.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lconsole.cpp 7 Jun 2005 04:17:29 -0000 1.1 --- lconsole.cpp 29 Nov 2005 05:45:09 -0000 1.2 *************** *** 14,18 **** #include "wx/wxprec.h" ! #ifdef __BORLANDC__ #pragma hdrstop --- 14,18 ---- #include "wx/wxprec.h" ! #ifdef __BORLANDC__ #pragma hdrstop *************** *** 33,44 **** #include "lconsole.h" ! BEGIN_EVENT_TABLE(wxDebugPanel, wxPanel) ! EVT_ERASE_BACKGROUND(wxDebugPanel::OnEraseBackground) ! EVT_SIZE(wxDebugPanel::OnSizeWindow) END_EVENT_TABLE() ! wxDebugPanel::wxDebugPanel(wxWindow *parent, lua_State *pState) : ! wxPanel(parent, -1, wxPoint(0, 0), wxSize(50, 1500)), ! m_pState(pState) { m_listBox = new wxListBox( this, --- 33,48 ---- #include "lconsole.h" ! // ---------------------------------------------------------------------------- ! // wxLuaDebugPanel ! // ---------------------------------------------------------------------------- ! ! BEGIN_EVENT_TABLE(wxLuaDebugPanel, wxPanel) ! EVT_ERASE_BACKGROUND(wxLuaDebugPanel::OnEraseBackground) ! EVT_SIZE(wxLuaDebugPanel::OnSizeWindow) END_EVENT_TABLE() ! wxLuaDebugPanel::wxLuaDebugPanel(wxWindow *parent, lua_State *pState) ! : wxPanel(parent, wxID_ANY, wxPoint(0, 0), wxSize(50, 1500)), ! m_pState(pState) { m_listBox = new wxListBox( this, *************** *** 50,64 **** } ! void wxDebugPanel::OnSizeWindow(wxSizeEvent& event) { wxSize size = event.GetSize(); m_listBox->SetSize(0, 0, size.x, size.y); } ! ! void wxDebugPanel::FillListbox() { ! int nIndex = 0; lua_Debug luaDebug; ! wxString buffer; m_listBox->Clear(); --- 54,68 ---- } ! void wxLuaDebugPanel::OnSizeWindow(wxSizeEvent& event) { wxSize size = event.GetSize(); m_listBox->SetSize(0, 0, size.x, size.y); } ! ! void wxLuaDebugPanel::FillListbox() { ! int nIndex = 0; lua_Debug luaDebug; ! wxString buffer; m_listBox->Clear(); *************** *** 73,77 **** { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s"), luaDebug.name); else --- 77,81 ---- { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s"), luaDebug.name); else *************** *** 81,89 **** { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s line %u"), luaDebug.name, lineNumber); else ! buffer.Printf(wxT("{global} line %u"), lineNumber); } --- 85,93 ---- { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s line %u"), luaDebug.name, lineNumber); else ! buffer.Printf(wxT("{global} line %u"), lineNumber); } *************** *** 97,104 **** } ! void wxDebugPanel::OnEraseBackground(wxEraseEvent& WXUNUSED(event)) { } BEGIN_EVENT_TABLE(wxLuaConsole, wxFrame) EVT_CLOSE(wxLuaConsole::OnCloseWindow) --- 101,112 ---- } ! void wxLuaDebugPanel::OnEraseBackground(wxEraseEvent& WXUNUSED(event)) { } + // ---------------------------------------------------------------------------- + // wxLuaConsole + // ---------------------------------------------------------------------------- + BEGIN_EVENT_TABLE(wxLuaConsole, wxFrame) EVT_CLOSE(wxLuaConsole::OnCloseWindow) *************** *** 106,134 **** END_EVENT_TABLE() ! wxLuaConsole::wxLuaConsole(wxLuaStandaloneApp *pApp, lua_State *pState) : ! m_pApp(pApp), ! m_fError(false), ! wxFrame(0, -1, wxT("wxLua Console"), wxPoint(0, 0), wxSize(250, 340)) { pApp->SetLuaConsole(this); ! SetIcon(wxICON(LUA)); ! m_splitter = new wxSplitterWindow(this, ! -1, ! wxPoint(0, 0), ! wxSize(0, 0), wxSP_3DSASH); ! m_textCtrl = new wxTextCtrl( m_splitter, ! -1, ! wxT(""), ! wxPoint(0, 0), ! wxSize(0, 0), wxTE_MULTILINE | wxTE_READONLY ! #ifdef __WXMSW__ | wxTE_RICH ! #endif ! ); ! m_panel = new wxDebugPanel( m_splitter, pState); m_splitter->SplitHorizontally( m_textCtrl, m_panel, 150); m_splitter->SetMinimumPaneSize(50); --- 114,141 ---- END_EVENT_TABLE() ! wxLuaConsole::wxLuaConsole(wxLuaStandaloneApp *pApp, lua_State *pState) ! : wxFrame(0, -1, wxT("wxLua Console"), wxPoint(0, 0), wxSize(250, 340)), ! m_pApp(pApp), m_fError(false), { pApp->SetLuaConsole(this); ! SetIcon(wxICON(LUA)); ! m_splitter = new wxSplitterWindow(this, ! -1, ! wxPoint(0, 0), ! wxSize(0, 0), wxSP_3DSASH); ! m_textCtrl = new wxTextCtrl( m_splitter, ! -1, ! wxT(""), ! wxPoint(0, 0), ! wxSize(0, 0), wxTE_MULTILINE | wxTE_READONLY ! #ifdef __WXMSW__ | wxTE_RICH ! #endif ! ); ! m_panel = new wxLuaDebugPanel( m_splitter, pState); m_splitter->SplitHorizontally( m_textCtrl, m_panel, 150); m_splitter->SetMinimumPaneSize(50); *************** *** 141,145 **** void wxLuaConsole::OnCloseWindow(wxCloseEvent&) { ! m_pApp->SetLuaConsole(NULL); Destroy(); if (m_fError) --- 148,152 ---- void wxLuaConsole::OnCloseWindow(wxCloseEvent&) { ! m_pApp->SetLuaConsole(NULL); Destroy(); if (m_fError) |
From: John L. <jr...@us...> - 2005-11-29 05:45:18
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/modules/wxlua/include Modified Files: internal.h wxlbind.h wxlcallb.h wxlstate.h Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: wxlcallb.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlcallb.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlcallb.h 28 Nov 2005 01:28:54 -0000 1.3 --- wxlcallb.h 29 Nov 2005 05:45:09 -0000 1.4 *************** *** 56,60 **** wxEventType m_eventType; private: ! DECLARE_CLASS(wxLuaCallback); }; --- 56,60 ---- wxEventType m_eventType; private: ! DECLARE_ABSTRACT_CLASS(wxLuaCallback); }; *************** *** 91,95 **** private: ! DECLARE_CLASS(wxLuaDestroyCallback) }; --- 91,95 ---- private: ! DECLARE_ABSTRACT_CLASS(wxLuaDestroyCallback) }; Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlbind.h 28 Nov 2005 06:05:08 -0000 1.3 --- wxlbind.h 29 Nov 2005 05:45:09 -0000 1.4 *************** *** 22,25 **** --- 22,27 ---- } + class WXDLLIMPEXP_WXLUA wxLuaBinding; + // ---------------------------------------------------------------------------- // wxLua binding enums and structs *************** *** 87,96 **** }; ! typedef WXLUACLASS* (*GetClassListFunction)(size_t &); ! typedef WXLUADEFINE* (*GetDefineListFunction)(size_t &); ! //typedef WXLUASTRING* (*GetDefineListFunction)(size_t &); FIXME - use this ! typedef WXLUAEVENT* (*GetEventListFunction)(size_t &); ! typedef WXLUAOBJECT* (*GetObjectListFunction)(size_t &); ! typedef WXLUAMETHOD* (*GetBuiltinListFunction)(size_t &); // ---------------------------------------------------------------------------- --- 89,101 ---- }; ! typedef WXLUACLASS* (*wxLuaGetClassListFunction)(size_t &); ! typedef WXLUADEFINE* (*wxLuaGetDefineListFunction)(size_t &); ! //typedef WXLUASTRING* (*wxLuaGetDefineListFunction)(size_t &); FIXME - use this ! typedef WXLUAEVENT* (*wxLuaGetEventListFunction)(size_t &); ! typedef WXLUAOBJECT* (*wxLuaGetObjectListFunction)(size_t &); ! typedef WXLUAMETHOD* (*wxLuaGetBuiltinListFunction)(size_t &); ! ! // list of wxLua Bindings ! WX_DECLARE_USER_EXPORTED_LIST(wxLuaBinding, wxLuaBindingList, WXDLLIMPEXP_WXLUA); // ---------------------------------------------------------------------------- *************** *** 105,108 **** --- 110,114 ---- public: wxLuaBinding(); + virtual ~wxLuaBinding() {} // lua namespace e.g. "wx" *************** *** 110,123 **** // Pointers to external Binding Functions ! GetClassListFunction pfGetClassList; ! GetDefineListFunction pfGetDefineList; ! GetEventListFunction pfGetEventList; ! GetObjectListFunction pfGetObjectList; ! GetBuiltinListFunction pfGetBuiltinList; // Binds C Functions/Defines/Object/Events to Lua Table ! void RegisterBinding(lua_State *L, bool registerTypes); // Unbinds C Functions/Defines/Object/Events by clearing Lua Table ! void UnRegisterBinding(lua_State *L); // --- 116,129 ---- // Pointers to external Binding Functions ! wxLuaGetClassListFunction pfGetClassList; ! wxLuaGetDefineListFunction pfGetDefineList; ! wxLuaGetEventListFunction pfGetEventList; ! wxLuaGetObjectListFunction pfGetObjectList; ! wxLuaGetBuiltinListFunction pfGetBuiltinList; // Binds C Functions/Defines/Object/Events to Lua Table ! virtual void RegisterBinding(lua_State *L, bool registerTypes); // Unbinds C Functions/Defines/Object/Events by clearing Lua Table ! virtual void UnRegisterBinding(lua_State *L); // *************** *** 142,151 **** bool SetBaseClassTag(WXLUACLASS *pClass); protected: // Registers binding, returns lua table reference to binding ! int LUACALL RegisterFunctions(lua_State *L, bool registerTypes); // Register the classes, definitions, objects and pointers generated by the binding // Sort the event list into order for faster event handler processing. ! void LUACALL RegisterGeneratedClasses(lua_State *L, int tableOffset, bool registerTypes); virtual void OnRegister(lua_State * WXUNUSED(L), bool WXUNUSED(registerTypes), int WXUNUSED(luaTable)) {} --- 148,160 ---- bool SetBaseClassTag(WXLUACLASS *pClass); + // Get all the bindings that were created + static wxLuaBindingList* GetBindingsList() { return &sm_bindings; } + protected: // Registers binding, returns lua table reference to binding ! virtual int LUACALL RegisterFunctions(lua_State *L, bool registerTypes); // Register the classes, definitions, objects and pointers generated by the binding // Sort the event list into order for faster event handler processing. ! virtual void LUACALL RegisterGeneratedClasses(lua_State *L, int tableOffset, bool registerTypes); virtual void OnRegister(lua_State * WXUNUSED(L), bool WXUNUSED(registerTypes), int WXUNUSED(luaTable)) {} *************** *** 168,176 **** int m_wxLuaTable; // The lua tag for the wxLua private tables ! DECLARE_CLASS(wxLuaBinding) ! }; ! // list of wxLua Bindings ! WX_DECLARE_USER_EXPORTED_LIST(wxLuaBinding, wxLuaBindingList, WXDLLIMPEXP_WXLUA); #endif // _WXLBIND_H_ --- 177,184 ---- int m_wxLuaTable; // The lua tag for the wxLua private tables ! static wxLuaBindingList sm_bindings; ! DECLARE_DYNAMIC_CLASS(wxLuaBinding) ! }; #endif // _WXLBIND_H_ Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxlstate.h 28 Nov 2005 06:05:08 -0000 1.5 --- wxlstate.h 29 Nov 2005 05:45:09 -0000 1.6 *************** *** 115,118 **** --- 115,121 ---- }; + // an invalid wxLuaState for comparison (like wxNullBitmap) + extern WXDLLIMPEXP_DATA_WXLUA(wxLuaState) wxNullLuaState; + class WXDLLIMPEXP_WXLUA wxLuaState : public wxObject { *************** *** 265,269 **** // get the derived method for the class cpIndex ! lua_State* getDerivedMethod(void *pObject, const char *method, lua_State *L = NULL); int LuaError(int status, int top); --- 268,272 ---- // get the derived method for the class cpIndex ! static wxLuaState getDerivedMethod(void *pObject, const char *method, lua_State *L = NULL); int LuaError(int status, int top); Index: internal.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/internal.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** internal.h 28 Nov 2005 06:05:08 -0000 1.10 --- internal.h 29 Nov 2005 05:45:09 -0000 1.11 *************** *** 29,33 **** // with standard lua functions. ! #define wxFileRead read #define wxFileWrite write #define wxFileReadWrite read_write --- 29,33 ---- // with standard lua functions. ! #define wxFileRead read // FIXME see file.i and wx_define.cpp need to remove these #define wxFileWrite write #define wxFileReadWrite read_write *************** *** 45,50 **** #endif - extern wxLuaInterpreter *wxFindLuaInterpreter(lua_State *L); - // ---------------------------------------------------------------------------- // wxLuaSmartStringArray - Wraps a "new" array of wxStrings with an automatic --- 45,48 ---- |
From: John L. <jr...@us...> - 2005-11-29 05:45:17
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/bindings/wxwidgets Modified Files: override.hpp wx.rules Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** override.hpp 25 Nov 2005 10:09:10 -0000 1.4 --- override.hpp 29 Nov 2005 05:45:09 -0000 1.5 *************** *** 6,10 **** { // get this ! wxPoint *self = ( wxPoint * ) getuserdatatype(L, 1, s_wxPoint ); // push the result number lua_pushnumber(L, self->x); --- 6,10 ---- { // get this ! wxPoint *self = ( wxPoint * ) getuserdatatype(L, 1, s_wxluatag_wxPoint ); // push the result number [...3064 lines suppressed...] returns = (long)self->m_pItem; --- 4116,4120 ---- double returns; // get this ! wxTreeItemId *self = ( wxTreeItemId * ) getuserdatatype(L, 1, s_wxluatag_wxTreeItemId ); // call GetValue returns = (long)self->m_pItem; *************** *** 4133,4137 **** long value = (long) getnumbertype(L, 2); // get this ! wxTreeItemId *self = ( wxTreeItemId * ) getuserdatatype(L, 1, s_wxTreeItemId ); // call SetValue self->m_pItem = (void *) value; --- 4133,4137 ---- long value = (long) getnumbertype(L, 2); // get this ! wxTreeItemId *self = ( wxTreeItemId * ) getuserdatatype(L, 1, s_wxluatag_wxTreeItemId ); // call SetValue self->m_pItem = (void *) value; Index: wx.rules =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx.rules,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wx.rules 28 Nov 2005 06:05:08 -0000 1.7 --- wx.rules 29 Nov 2005 05:45:09 -0000 1.8 *************** *** 12,25 **** hook_binding_class = hook_namespace.."_Binding" -- wxLuaBinding class hook_define_file = hook_namespace.."_define" ! hook_define_fn = "GetDefineList_"..hook_namespace hook_object_file = hook_namespace.."_object" ! hook_object_fn = "GetObjectList_"..hook_namespace hook_event_file = hook_namespace.."_event" ! hook_event_fn = "GetEventList_"..hook_namespace hook_builtin_file = hook_namespace.."_builtin" ! hook_builtin_fn = "GetBuiltinList_"..hook_namespace hook_class_file = hook_namespace.."_class" ! hook_class_fn = "GetClassList_"..hook_namespace hook_header_file = "wxbind/include/wxbind.h" override_file = "override.hpp" -- bindings to override --- 12,26 ---- hook_binding_class = hook_namespace.."_Binding" -- wxLuaBinding class hook_define_file = hook_namespace.."_define" ! hook_define_fn = "wxLuaGetDefineList_"..hook_namespace hook_object_file = hook_namespace.."_object" ! hook_object_fn = "wxLuaGetObjectList_"..hook_namespace hook_event_file = hook_namespace.."_event" ! hook_event_fn = "wxLuaGetEventList_"..hook_namespace hook_builtin_file = hook_namespace.."_builtin" ! hook_builtin_fn = "wxLuaGetBuiltinList_"..hook_namespace hook_class_file = hook_namespace.."_class" ! hook_class_fn = "wxLuaGetClassList_"..hook_namespace hook_header_file = "wxbind/include/wxbind.h" + override_file = "override.hpp" -- bindings to override |
From: John L. <jr...@us...> - 2005-11-29 05:45:17
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/modules/wxbind/src Modified Files: wxlhtmlwin.cpp wxlprint.cpp Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: wxlprint.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlprint.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlprint.cpp 26 Nov 2005 08:46:57 -0000 1.3 --- wxlprint.cpp 29 Nov 2005 05:45:09 -0000 1.4 *************** *** 36,40 **** // This lua tag is defined in wxLuaWrap.cpp ! extern int s_wxLuaPrintout; // ---------------------------------------------------------------------------- --- 36,40 ---- // This lua tag is defined in wxLuaWrap.cpp ! extern int s_wxluatag_wxLuaPrintout; // ---------------------------------------------------------------------------- *************** *** 44,54 **** IMPLEMENT_CLASS(wxLuaPrintout, wxPrintout) ! wxLuaPrintout::wxLuaPrintout(const wxString& title, wxLuaObject *pObject) : ! wxPrintout(title), ! m_pObject(pObject), ! m_minPage(0), ! m_maxPage(0), ! m_pageFrom(0), ! m_pageTo(0) { } --- 44,50 ---- IMPLEMENT_CLASS(wxLuaPrintout, wxPrintout) ! wxLuaPrintout::wxLuaPrintout(const wxString& title, wxLuaObject *pObject) ! :wxPrintout(title), m_pObject(pObject), ! m_minPage(0), m_maxPage(0), m_pageFrom(0), m_pageTo(0) { } *************** *** 64,81 **** void wxLuaPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) { ! lua_State *luaState = getDerivedMethod(this, "GetPageInfo"); ! if (luaState != NULL) { ! int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); ! LuaCall(luaState, 1, false); ! *minPage = (int) lua_tonumber(luaState, -4); ! *maxPage = (int) lua_tonumber(luaState, -3); ! *pageFrom = (int) lua_tonumber(luaState, -2); ! *pageTo = (int) lua_tonumber(luaState, -1); ! lua_settop(luaState, nOldTop); } else --- 60,77 ---- void wxLuaPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) { ! wxLuaState wxlState(wxLuaState::getDerivedMethod(this, "GetPageInfo")); ! if (!wxlState.Ok()) { ! int nOldTop = lua_gettop(wxlState.GetLuaState()); ! wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout); ! wxlState.LuaCall(1, false); ! *minPage = (int) lua_tonumber(wxlState.GetLuaState(), -4); ! *maxPage = (int) lua_tonumber(wxlState.GetLuaState(), -3); ! *pageFrom = (int) lua_tonumber(wxlState.GetLuaState(), -2); ! *pageTo = (int) lua_tonumber(wxlState.GetLuaState(), -1); ! lua_settop(wxlState.GetLuaState(), nOldTop); } else *************** *** 95,99 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, pageNum); --- 91,95 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); lua_pushnumber(luaState, pageNum); *************** *** 116,120 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, startPage); lua_pushnumber(luaState, endPage); --- 112,116 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); lua_pushnumber(luaState, startPage); lua_pushnumber(luaState, endPage); *************** *** 138,142 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); --- 134,138 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 152,156 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); --- 148,152 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 166,170 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); --- 162,166 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 180,184 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); --- 176,180 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 195,199 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, pageNum); --- 191,195 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); lua_pushnumber(luaState, pageNum); Index: wxlhtmlwin.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlhtmlwin.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlhtmlwin.cpp 26 Nov 2005 08:46:57 -0000 1.3 --- wxlhtmlwin.cpp 29 Nov 2005 05:45:09 -0000 1.4 *************** *** 33,40 **** // These are the wxLua tags defined in wxbind ! extern int s_wxLuaHtmlWindow; ! extern int s_wxHtmlCell; ! extern int s_wxMouseEvent; ! extern int s_wxHtmlLinkInfo; DEFINE_EVENT_TYPE(wxEVT_HTML_TAG_HANDLER) --- 33,40 ---- // These are the wxLua tags defined in wxbind ! extern int s_wxluatag_wxLuaHtmlWindow; ! extern int s_wxluatag_wxHtmlCell; ! extern int s_wxluatag_wxMouseEvent; ! extern int s_wxluatag_wxHtmlLinkInfo; DEFINE_EVENT_TYPE(wxEVT_HTML_TAG_HANDLER) *************** *** 74,82 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaHtmlWindow); ! tpushusertag(luaState, cell, s_wxHtmlCell); lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); ! tpushusertag(luaState, (void *) &event, s_wxMouseEvent); LuaCall(luaState, 5, false); --- 74,82 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaHtmlWindow); ! tpushusertag(luaState, cell, s_wxluatag_wxHtmlCell); lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); ! tpushusertag(luaState, (void *) &event, s_wxluatag_wxMouseEvent); LuaCall(luaState, 5, false); *************** *** 98,103 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaHtmlWindow); ! tpushusertag(luaState, cell, s_wxHtmlCell); lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); --- 98,103 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaHtmlWindow); ! tpushusertag(luaState, cell, s_wxluatag_wxHtmlCell); lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); *************** *** 116,121 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaHtmlWindow); ! tpushusertag(luaState, (void *) &link, s_wxHtmlLinkInfo); LuaCall(luaState, 2, true); --- 116,121 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaHtmlWindow); ! tpushusertag(luaState, (void *) &link, s_wxluatag_wxHtmlLinkInfo); LuaCall(luaState, 2, true); *************** *** 132,136 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaHtmlWindow); lua_pushstring(luaState, wx2lua(title)); --- 132,136 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaHtmlWindow); lua_pushstring(luaState, wx2lua(title)); |
From: John L. <jr...@us...> - 2005-11-29 05:45:17
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/bindings Modified Files: genwxbind.lua Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** genwxbind.lua 28 Nov 2005 06:05:08 -0000 1.9 --- genwxbind.lua 29 Nov 2005 05:45:09 -0000 1.10 *************** *** 2431,2435 **** table.insert(codeList, " // get this\n") end ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *) wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name)..");\n") if memberType == "wxString" then --- 2431,2435 ---- table.insert(codeList, " // get this\n") end ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *) wxlState.getuserdatatype(1, s_wxluatag_"..MakeClassVar(parseObject.Name)..");\n") if memberType == "wxString" then *************** *** 2444,2450 **** -- if string.find(member.Name, "::") then ! -- table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(memberType)..", "..member.Name..");\n") -- else ! table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(memberType)..", &self->"..member.Name..");\n") -- end elseif not intrinsic then --- 2444,2450 ---- -- if string.find(member.Name, "::") then ! -- table.insert(codeList, " wxlState.pushuserdatatype(s_wxluatag_"..MakeClassVar(memberType)..", "..member.Name..");\n") -- else ! table.insert(codeList, " wxlState.pushuserdatatype(s_wxluatag_"..MakeClassVar(memberType)..", &self->"..member.Name..");\n") -- end elseif not intrinsic then *************** *** 2453,2457 **** end ! table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(memberType)..", self->"..member.Name..");\n") elseif type == "BOOL" or type == "bool" then if (comment) then --- 2453,2457 ---- end ! table.insert(codeList, " wxlState.pushuserdatatype(s_wxluatag_"..MakeClassVar(memberType)..", self->"..member.Name..");\n") elseif type == "BOOL" or type == "bool" then if (comment) then *************** *** 2511,2520 **** table.insert(codeList, " // get the data type value\n") end ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxlState.getuserdatatype(2, s_"..MakeClassVar(memberType).." );\n") elseif not intrinsic then if (comment) then table.insert(codeList, " // get the data type value\n") end ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxlState.getuserdatatype(2, s_"..MakeClassVar(memberType).." );\n") elseif memberType == "BOOL" or memberType == "bool" then if (comment) then --- 2511,2520 ---- table.insert(codeList, " // get the data type value\n") end ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxlState.getuserdatatype(2, s_wxluatag_"..MakeClassVar(memberType).." );\n") elseif not intrinsic then if (comment) then table.insert(codeList, " // get the data type value\n") end ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxlState.getuserdatatype(2, s_wxluatag_"..MakeClassVar(memberType).." );\n") elseif memberType == "BOOL" or memberType == "bool" then if (comment) then *************** *** 2531,2535 **** table.insert(codeList, " // get this\n") end ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *)wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name)..");\n") if not intrinsic and (not memberPtr or memberPtr == "&") then --- 2531,2535 ---- table.insert(codeList, " // get this\n") end ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *)wxlState.getuserdatatype(1, s_wxluatag_"..MakeClassVar(parseObject.Name)..");\n") if not intrinsic and (not memberPtr or memberPtr == "&") then *************** *** 2647,2651 **** local objectBinding = { ! Map = " { &"..member.Name..", 0, \""..member.Name.."\", &s_"..MakeClassVar(parseObject.Name).." },\n", Condition = fullcondition } --- 2647,2651 ---- local objectBinding = { ! Map = " { &"..member.Name..", 0, \""..member.Name.."\", &s_wxluatag_"..MakeClassVar(parseObject.Name).." },\n", Condition = fullcondition } *************** *** 2659,2663 **** local objectTagBinding = { ! ExternDeclaration = "extern int s_"..MakeClassVar(parseObject.Name)..";\n", Condition = fullcondition } --- 2659,2663 ---- local objectTagBinding = { ! ExternDeclaration = "extern int s_wxluatag_"..MakeClassVar(parseObject.Name)..";\n", Condition = fullcondition } *************** *** 2683,2687 **** local pointerBinding = { ! Map = " { 0, (const void **) &"..member.Name..", \""..member.Name.."\", &s_"..MakeClassVar(parseObject.Name).." },\n", Condition = fullcondition } --- 2683,2687 ---- local pointerBinding = { ! Map = " { 0, (const void **) &"..member.Name..", \""..member.Name.."\", &s_wxluatag_"..MakeClassVar(parseObject.Name).." },\n", Condition = fullcondition } *************** *** 2695,2699 **** local objectTagBinding = { ! ExternDeclaration = "extern int s_"..MakeClassVar(parseObject.Name)..";\n", Condition = fullcondition } --- 2695,2699 ---- local objectTagBinding = { ! ExternDeclaration = "extern int s_wxluatag_"..MakeClassVar(parseObject.Name)..";\n", Condition = fullcondition } *************** *** 2719,2723 **** local eventBinding = { ! Map = " { &"..member.Name..", \""..member.Name.."\", &s_"..MakeClassVar(parseObject.Name).." },\n", Condition = fullcondition } --- 2719,2723 ---- local eventBinding = { ! Map = " { &"..member.Name..", \""..member.Name.."\", &s_wxluatag_"..MakeClassVar(parseObject.Name).." },\n", Condition = fullcondition } *************** *** 2731,2735 **** local eventTagBinding = { ! ExternDeclaration = "extern int s_"..MakeClassVar(parseObject.Name)..";\n", Condition = fullcondition } --- 2731,2735 ---- local eventTagBinding = { ! ExternDeclaration = "extern int s_wxluatag_"..MakeClassVar(parseObject.Name)..";\n", Condition = fullcondition } *************** *** 2822,2826 **** declare = "int count = 0; wxLuaSmartStringArray ptr; "..argTypeWithAttrib.." "..argName.."; ptr = " elseif not intrinsic then ! argItem = "("..argTypeWithAttrib..") wxlState.getuserdatatype("..argNum..", s_"..MakeClassVar(argType)..")" else argItem = "("..argTypeWithAttrib..") wxlState.ttouserdata("..argNum..")" --- 2822,2826 ---- declare = "int count = 0; wxLuaSmartStringArray ptr; "..argTypeWithAttrib.." "..argName.."; ptr = " elseif not intrinsic then ! argItem = "("..argTypeWithAttrib..") wxlState.getuserdatatype("..argNum..", s_wxluatag_"..MakeClassVar(argType)..")" else argItem = "("..argTypeWithAttrib..") wxlState.ttouserdata("..argNum..")" *************** *** 2849,2853 **** if not intrinsic then ! argItem = "("..argTypeWithAttrib..")wxlState.getuserdatatype("..argNum..", s_"..MakeClassVar(argType)..")" else argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" --- 2849,2853 ---- if not intrinsic then ! argItem = "("..argTypeWithAttrib..")wxlState.getuserdatatype("..argNum..", s_wxluatag_"..MakeClassVar(argType)..")" else argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" *************** *** 2857,2861 **** if not intrinsic then argTypeWithAttrib = argTypeWithAttrib.." **" ! argItem = "("..argTypeWithAttrib..")wxlState.getuserdatatype("..argNum..", s_"..MakeClassVar(argType)..")" else argTypeWithAttrib = argTypeWithAttrib.." *" --- 2857,2861 ---- if not intrinsic then argTypeWithAttrib = argTypeWithAttrib.." **" ! argItem = "("..argTypeWithAttrib..")wxlState.getuserdatatype("..argNum..", s_wxluatag_"..MakeClassVar(argType)..")" else argTypeWithAttrib = argTypeWithAttrib.." *" *************** *** 2879,2883 **** argTypeWithAttrib = argTypeWithAttrib.." *" if not intrinsic then ! argItem = "("..argTypeWithAttrib..")wxlState.getuserdatatype("..argNum..", s_"..MakeClassVar(argType)..")" else argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" --- 2879,2883 ---- argTypeWithAttrib = argTypeWithAttrib.." *" if not intrinsic then ! argItem = "("..argTypeWithAttrib..")wxlState.getuserdatatype("..argNum..", s_wxluatag_"..MakeClassVar(argType)..")" else argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" *************** *** 3133,3137 **** table.insert(codeList, " // push the constructed class pointer\n") end ! table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(parseObject.Name)..", returns );\n") table.insert(codeList, "\n return 1;\n") --- 3133,3137 ---- table.insert(codeList, " // push the constructed class pointer\n") end ! table.insert(codeList, " wxlState.pushuserdatatype(s_wxluatag_"..MakeClassVar(parseObject.Name)..", returns );\n") table.insert(codeList, "\n return 1;\n") *************** *** 3148,3152 **** end ! table.insert(codeList, " "..parseObject.Name.." * self = ( "..parseObject.Name.." * )wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name).." );\n") -- static member function? --- 3148,3152 ---- end ! table.insert(codeList, " "..parseObject.Name.." * self = ( "..parseObject.Name.." * )wxlState.getuserdatatype(1, s_wxluatag_"..MakeClassVar(parseObject.Name).." );\n") -- static member function? *************** *** 3211,3215 **** table.insert(codeList, " // push the result datatype\n") end ! table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(memberType)..", returns );\n") elseif member.DataType == "BOOL" or member.DataType == "bool" then if (comment) then --- 3211,3215 ---- table.insert(codeList, " // push the result datatype\n") end ! table.insert(codeList, " wxlState.pushuserdatatype(s_wxluatag_"..MakeClassVar(memberType)..", returns );\n") elseif member.DataType == "BOOL" or member.DataType == "bool" then if (comment) then *************** *** 3288,3292 **** local classTagBinding = { ! ExternDeclaration = "extern int s_"..MakeClassVar(parseObject.Name)..";\n", ExternMethodDeclaration = "extern WXLUAMETHOD* "..MakeVar(parseObject.Name).."_methods;\n", ExternMethodCountDeclaration = "extern int "..MakeVar(parseObject.Name).."_methodCount;\n", --- 3288,3292 ---- local classTagBinding = { ! ExternDeclaration = "extern int s_wxluatag_"..MakeClassVar(parseObject.Name)..";\n", ExternMethodDeclaration = "extern WXLUAMETHOD* "..MakeVar(parseObject.Name).."_methods;\n", ExternMethodCountDeclaration = "extern int "..MakeVar(parseObject.Name).."_methodCount;\n", *************** *** 3304,3308 **** decl = decl.."// Lua MetaTable Tag for Class\n" end ! decl = decl.."int s_"..MakeClassVar(parseObject.Name).." = -1;\n" interface.objectData[o].TagDeclaration = decl --- 3304,3308 ---- decl = decl.."// Lua MetaTable Tag for Class\n" end ! decl = decl.."int s_wxluatag_"..MakeClassVar(parseObject.Name).." = -1;\n" interface.objectData[o].TagDeclaration = decl *************** *** 3322,3326 **** local classBinding = { ! Map = " { \""..MakeVar(parseObject.Name).."\", "..MakeVar(parseObject.Name).."_methods, "..MakeVar(parseObject.Name).."_methodCount, -1, "..classinfo..", &s_"..MakeClassVar(parseObject.Name)..", "..MakeVar(baseclass).." }, \n", Condition = classcondition } --- 3322,3326 ---- local classBinding = { ! Map = " { \""..MakeVar(parseObject.Name).."\", "..MakeVar(parseObject.Name).."_methods, "..MakeVar(parseObject.Name).."_methodCount, -1, "..classinfo..", &s_wxluatag_"..MakeClassVar(parseObject.Name)..", "..MakeVar(baseclass).." }, \n", Condition = classcondition } *************** *** 3337,3341 **** table.insert(codeList, "static int LUACALL "..MakeVar(parseObject.Name).."_destructor(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name)..");\n") if (comment) then --- 3337,3341 ---- table.insert(codeList, "static int LUACALL "..MakeVar(parseObject.Name).."_destructor(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.getuserdatatype(1, s_wxluatag_"..MakeClassVar(parseObject.Name)..");\n") if (comment) then *************** *** 3365,3369 **** table.insert(codeList, "static int LUACALL "..MakeVar(parseObject.Name).."_Delete(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name)..");\n") if (comment) then --- 3365,3369 ---- table.insert(codeList, "static int LUACALL "..MakeVar(parseObject.Name).."_Delete(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.getuserdatatype(1, s_wxluatag_"..MakeClassVar(parseObject.Name)..");\n") if (comment) then *************** *** 3615,3620 **** table.insert(fileData, "IMPLEMENT_CLASS("..hook_binding_class..", wxLuaBinding)\n") table.insert(fileData, "\n") ! table.insert(fileData, ""..hook_binding_class.."::"..hook_binding_class.."()\n") ! table.insert(fileData, " : wxLuaBinding()\n") table.insert(fileData, "{\n") table.insert(fileData, " nameSpace = wxT(\""..hook_namespace.."\");\n") --- 3615,3619 ---- table.insert(fileData, "IMPLEMENT_CLASS("..hook_binding_class..", wxLuaBinding)\n") table.insert(fileData, "\n") ! table.insert(fileData, ""..hook_binding_class.."::"..hook_binding_class.."() : wxLuaBinding()\n") table.insert(fileData, "{\n") table.insert(fileData, " nameSpace = wxT(\""..hook_namespace.."\");\n") *************** *** 3642,3656 **** table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L)\n") table.insert(fileData, "{\n") ! table.insert(fileData, " wxLuaState wxLS(L);\n"); ! table.insert(fileData, " wxCHECK_MSG(wxLS.Ok(), false, wxT(\"Invalid wxLuaState\"));\n"); table.insert(fileData, "\n"); ! table.insert(fileData, " wxASSERT(!wxLS.GetLuaStateRefData()->m_typesRegistered);\n"); ! table.insert(fileData, " wxASSERT(!wxLS.GetLuaBinding(wxT(\""..hook_namespace.."\")));\n"); table.insert(fileData, "\n"); table.insert(fileData, " // ignore binding request when we already have "..hook_namespace.." registered\n"); ! table.insert(fileData, " if (wxLS.GetLuaBinding(wxT(\""..hook_namespace.."\")))\n"); table.insert(fileData, " return false;\n"); table.insert(fileData, "\n"); ! table.insert(fileData, " wxLS.GetLuaStateRefData()->m_bindings.Append(new "..hook_binding_class.."());\n"); table.insert(fileData, "\n"); table.insert(fileData, " return true;\n"); --- 3641,3655 ---- table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L)\n") table.insert(fileData, "{\n") ! table.insert(fileData, " wxLuaState wxlState(L);\n"); ! table.insert(fileData, " wxCHECK_MSG(wxlState.Ok(), false, wxT(\"Invalid wxLuaState\"));\n"); table.insert(fileData, "\n"); ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaStateRefData()->m_typesRegistered);\n"); ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaBinding(wxT(\""..hook_namespace.."\")));\n"); table.insert(fileData, "\n"); table.insert(fileData, " // ignore binding request when we already have "..hook_namespace.." registered\n"); ! table.insert(fileData, " if (wxlState.GetLuaBinding(wxT(\""..hook_namespace.."\")))\n"); table.insert(fileData, " return false;\n"); table.insert(fileData, "\n"); ! table.insert(fileData, " wxlState.GetLuaStateRefData()->m_bindings.Append(new "..hook_binding_class.."());\n"); table.insert(fileData, "\n"); table.insert(fileData, " return true;\n"); *************** *** 3716,3719 **** --- 3715,3732 ---- table.insert(fileData, "}\n\n") + -- create a instance of the hook binding class to initialize it + table.insert(fileData, "\n\n") + + table.insert(fileData, "class "..hook_binding_class.."Init\n") + table.insert(fileData, "{\n") + table.insert(fileData, "public:\n") + table.insert(fileData, " "..hook_binding_class.."Init()\n") + table.insert(fileData, " {\n") + table.insert(fileData, " m_binding.GetBindingsList()->Append(&m_binding);\n") + table.insert(fileData, " }\n") + table.insert(fileData, " "..hook_binding_class.." m_binding;\n") + table.insert(fileData, "};\n\n") + table.insert(fileData, hook_binding_class.."Init s_"..hook_binding_class.."Init;\n\n") + return fileData end |
From: John L. <jr...@us...> - 2005-11-29 05:45:17
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/modules/wxluasocket/include Modified Files: wxldserv.h Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxldserv.h 25 Nov 2005 19:45:36 -0000 1.2 --- wxldserv.h 29 Nov 2005 05:45:10 -0000 1.3 *************** *** 102,106 **** static void NotifyError(const wxString &msg); static int LuaCompileError (lua_State *L); ! DECLARE_CLASS(wxLuaDebugServer) }; --- 102,106 ---- static void NotifyError(const wxString &msg); static int LuaCompileError (lua_State *L); ! DECLARE_ABSTRACT_CLASS(wxLuaDebugServer) }; |
From: John L. <jr...@us...> - 2005-11-29 05:45:17
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/modules/wxbind/include Modified Files: wxlprint.h Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: wxlprint.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxlprint.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlprint.h 26 Nov 2005 08:46:57 -0000 1.3 --- wxlprint.h 29 Nov 2005 05:45:09 -0000 1.4 *************** *** 48,52 **** int m_pageFrom; int m_pageTo; ! DECLARE_CLASS(wxLuaPrintout) }; --- 48,52 ---- int m_pageFrom; int m_pageTo; ! DECLARE_DYNAMIC_CLASS(wxLuaPrintout) }; |
From: John L. <jr...@us...> - 2005-11-28 06:05:20
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27690/wxLua/modules/wxlua/src Modified Files: internal.cpp wxlbind.cpp wxlcallb.cpp wxlintrp.cpp wxlstate.cpp Log Message: Use wxLuaState in the bindings #define tpushliteralstring replaced with tpushwxLuaReferences tpushwxLuaNull #define caused linking problems w/ gcc remove unused vars in wxLuaStateRefData Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** internal.cpp 28 Nov 2005 01:28:54 -0000 1.14 --- internal.cpp 28 Nov 2005 06:05:08 -0000 1.15 *************** *** 109,113 **** bool ret = false; // false indicates index out of range ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 109,113 ---- bool ret = false; // false indicates index out of range ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 132,136 **** int LUACALL tgetn (lua_State *L) { ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 132,136 ---- int LUACALL tgetn (lua_State *L) { ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 250,253 **** --- 250,264 ---- } + void LUACALL tpushwxLuaReferences(lua_State *L) + { + lua_pushstring(L, wxLuaReferences); //, strlen(wxLuaReferences)-1); // FIXME this used to be #define tpushliteralstring(str, sizeof(str)-1) + + } + + void LUACALL tpushwxLuaNull(lua_State *L) + { + lua_pushstring(L, wxLuaNull); //, strlen(wxLuaNull)-1); + } + //----------------------------------------------------------------------------- // wxLuaObject *************** *** 292,296 **** void wxLuaObject::ModifyAllocationFlags(int iValue) { ! // FIXME - who uses this? if (iValue & 1) m_alloc_flags &= (~wxLUAOBJECT_BOOL); if (iValue & 2) m_alloc_flags &= (~wxLUAOBJECT_INT); --- 303,307 ---- void wxLuaObject::ModifyAllocationFlags(int iValue) { ! // FIXME - who uses and knows how to use this? if (iValue & 1) m_alloc_flags &= (~wxLUAOBJECT_BOOL); if (iValue & 2) m_alloc_flags &= (~wxLUAOBJECT_INT); *************** *** 335,339 **** } ! return (m_iReference != LUA_NOREF) && (tget(GetLuaState(), m_iReference) != 0); } --- 346,350 ---- } ! return (m_iReference != LUA_NOREF) && (m_wxlState.tget(m_iReference) != 0); } *************** *** 346,350 **** void wxLuaObject::SetObject(int iParam) { ! if (m_wxlState.Ok() && (m_iReference != LUA_NOREF)) m_wxlState.tremove(m_iReference); --- 357,361 ---- void wxLuaObject::SetObject(int iParam) { ! if (m_wxlState.Ok() && (m_iReference != LUA_NOREF)) // FIXME should this error out? m_wxlState.tremove(m_iReference); *************** *** 352,358 **** if (m_wxlState.Ok()) - { m_iReference = m_wxlState.tinsert(iParam); - } } --- 363,367 ---- *************** *** 409,412 **** --- 418,425 ---- } + // ---------------------------------------------------------------------------- + // wxLuaCheckStack - dumps the contents of the lua_State + // ---------------------------------------------------------------------------- + wxLuaCheckStack::wxLuaCheckStack(lua_State *lua_state, const wxString &msg) { *************** *** 449,460 **** void wxLuaCheckStack::DumpTable(lua_State *lua_state, const wxString &name) { ! wxHashTable* dumpList = new wxHashTable(wxKEY_INTEGER); lua_pushstring(lua_state, wx2lua(name)); lua_gettable(lua_state, LUA_GLOBALSINDEX); ! DumpTable(lua_state, lua_gettop(lua_state), name, *dumpList, 0); lua_pop(lua_state, 1); - - delete dumpList; } --- 462,471 ---- void wxLuaCheckStack::DumpTable(lua_State *lua_state, const wxString &name) { ! wxHashTable dumpList(wxKEY_INTEGER); lua_pushstring(lua_state, wx2lua(name)); lua_gettable(lua_state, LUA_GLOBALSINDEX); ! DumpTable(lua_state, lua_gettop(lua_state), name, dumpList, 0); lua_pop(lua_state, 1); } *************** *** 1016,1020 **** wxCHECK_MSG(wxlState.Ok(), 1, wxT("Invalid wxLuaState")); ! if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (ttag(L, 1) == wxlState.GetLuaStateRefData()->m_functionTag)) { wxLuaFunction *pFunction = (wxLuaFunction *)wxlState.ttouserdata(1, true); --- 1027,1031 ---- wxCHECK_MSG(wxlState.Ok(), 1, wxT("Invalid wxLuaState")); ! if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == wxlState.GetLuaFunctionTag())) { wxLuaFunction *pFunction = (wxLuaFunction *)wxlState.ttouserdata(1, true); *************** *** 1034,1040 **** WXLUACLASS *pClass = (WXLUACLASS *)lua_touserdata(L, lua_upvalueindex(1)); ! if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (ttag(L, 1) == *pClass->class_tag)) { ! wxHashTable *pHashTable = (wxHashTable *) wxlState.GetLuaStateRefData()->m_pDerivedList->Delete((int) ttouserdata(L, 1, true)); if (pHashTable != NULL) delete pHashTable; --- 1045,1051 ---- WXLUACLASS *pClass = (WXLUACLASS *)lua_touserdata(L, lua_upvalueindex(1)); ! if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == *pClass->class_tag)) { ! wxHashTable *pHashTable = (wxHashTable *) wxlState.GetLuaStateRefData()->m_pDerivedList->Delete((int)wxlState.ttouserdata(1, true)); if (pHashTable != NULL) delete pHashTable; *************** *** 1158,1162 **** if (pFunction != NULL) { ! wxlState.tpushusertag(pFunction, wxlState.GetLuaStateRefData()->m_functionTag); result = 1; fFound = true; --- 1169,1173 ---- if (pFunction != NULL) { ! wxlState.tpushusertag(pFunction, wxlState.GetLuaFunctionTag()); result = 1; fFound = true; *************** *** 1237,1241 **** wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); ! if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (ttag(L, 1) == wxlState.GetLuaStateRefData()->m_functionTag)) { wxLuaFunction *pFunction = (wxLuaFunction *)wxlState.ttouserdata(1); --- 1248,1252 ---- wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); ! if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (ttag(L, 1) == wxlState.GetLuaFunctionTag())) { wxLuaFunction *pFunction = (wxLuaFunction *)wxlState.ttouserdata(1); *************** *** 1251,1257 **** wxCHECK_MSG(wxlState.Ok(), NULL, wxT("Invalid wxLuaState")); ! if (nTag == wxlState.GetLuaStateRefData()->m_wxLuaNull) return wxLuaNull; ! if (nTag == wxlState.GetLuaStateRefData()->m_functionTag) return "wxLuaFunction"; --- 1262,1268 ---- wxCHECK_MSG(wxlState.Ok(), NULL, wxT("Invalid wxLuaState")); ! if (nTag == wxlState.GetLuaNull()) return wxLuaNull; ! if (nTag == wxlState.GetLuaFunctionTag()) return "wxLuaFunction"; Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxlstate.cpp 28 Nov 2005 01:28:55 -0000 1.7 --- wxlstate.cpp 28 Nov 2005 06:05:08 -0000 1.8 *************** *** 77,82 **** } ! // Not found ! return NULL; } --- 77,81 ---- } ! return NULL; // Not found } *************** *** 104,108 **** } ! return NULL; } --- 103,107 ---- } ! return NULL; // Not found } *************** *** 186,196 **** m_lua_State_static = false; m_typesRegistered = false; - m_startTag = 0; - m_lastTag = 0; m_functionTag = 0; - m_wxLuaTable = 0; m_wxLuaNull = 0; m_wxDeleteTable = 0; ! m_inEventType = -1; m_pDerivedList = new wxHashTable(wxKEY_INTEGER); m_pTrackedList = new wxHashTable(wxKEY_INTEGER); --- 185,192 ---- m_lua_State_static = false; m_typesRegistered = false; m_functionTag = 0; m_wxLuaNull = 0; m_wxDeleteTable = 0; ! m_inEventType = wxEVT_NULL; m_pDerivedList = new wxHashTable(wxKEY_INTEGER); m_pTrackedList = new wxHashTable(wxKEY_INTEGER); *************** *** 275,279 **** } ! void wxLuaStateRefData::CleanupWxLua(bool closeLua /* = true*/) { // from lua50/lib/lbaselib.c, the collectgarbage lua function --- 271,275 ---- } ! void wxLuaStateRefData::CleanupWxLua(bool closeLua) { // from lua50/lib/lbaselib.c, the collectgarbage lua function *************** *** 333,337 **** } ! lua_pushstring(m_lua_State, WXLUAREFERENCES); lua_pushnil(m_lua_State); lua_rawset(m_lua_State, LUA_REGISTRYINDEX); --- 329,333 ---- } ! tpushwxLuaReferences(m_lua_State); lua_pushnil(m_lua_State); lua_rawset(m_lua_State, LUA_REGISTRYINDEX); *************** *** 454,458 **** if ( refData ) { ! // we need to inc the ref count wxLuaState lS; lS.SetRefData(refData); --- 450,454 ---- if ( refData ) { ! // we need to increment the ref count wxLuaState lS; lS.SetRefData(refData); *************** *** 466,470 **** bool wxLuaState::Ok() const { ! return (m_refData != NULL) && GetLuaStateRefData()->m_lua_State; } --- 462,466 ---- bool wxLuaState::Ok() const { ! return (m_refData != NULL) && M_WXLSTATEDATA->m_lua_State; } *************** *** 472,479 **** { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return GetLuaStateRefData()->CloseLuaState(force); } - lua_State* wxLuaState::GetLuaState() const { --- 468,474 ---- { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return M_WXLSTATEDATA->CloseLuaState(force); } lua_State* wxLuaState::GetLuaState() const { *************** *** 482,485 **** --- 477,486 ---- } + wxEventType wxLuaState::GetInEventType() const + { + wxCHECK_MSG(Ok(), wxEVT_NULL, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_inEventType; + } + void wxLuaState::RegisterBindings(bool registerTypes) { *************** *** 489,493 **** // create references table in registry ! lua_pushstring(L, WXLUAREFERENCES); lua_newtable(L); lua_rawset(L, LUA_REGISTRYINDEX); --- 490,494 ---- // create references table in registry ! tpushwxLuaReferences(L); lua_newtable(L); lua_rawset(L, LUA_REGISTRYINDEX); *************** *** 662,693 **** } // ---------------------------------------------------------------------------- // memory tracking functions bool wxLuaState::removeTrackedMemory(void *pObject, bool fDelete) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")) - bool result = false; wxObject *pDeleteObject = M_WXLSTATEDATA->m_pTrackedList->Delete((int) pObject); ! if (fDelete && pDeleteObject != NULL) ! { delete pDeleteObject; ! result = true; ! } return result; } ! void wxLuaState::addToTrackedMemoryList(wxObject *pObject) { ! wxCHECK_RET(pObject, wxT("Invalid lua state and/or wxObject")); ! wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")) ! M_WXLSTATEDATA->m_pTrackedList->Put((int)pObject, pObject); } ! bool wxLuaIsParentWindowTracked(wxList *list, wxWindow* win) { ! wxCHECK_MSG(list && win, false, wxT("Invalid list or parent")); wxWindow *parent = win; while (parent) --- 663,742 ---- } + wxLuaBindingList* wxLuaState::GetLuaBindingList() const + { + wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); + return &M_WXLSTATEDATA->m_bindings; + } + bool wxLuaState::GetTypesRegistered() const + { + wxCHECK_MSG(GetRefData() != NULL, false, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_typesRegistered; + } + int wxLuaState::GetLuaFunctionTag() const + { + wxCHECK_MSG(GetRefData() != NULL, 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_functionTag; + } + int wxLuaState::GetLuaNull() const + { + wxCHECK_MSG(GetRefData() != NULL, 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_wxLuaNull; + } + int wxLuaState::GetLuaDeleteTable() const + { + wxCHECK_MSG(GetRefData() != NULL, 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_wxDeleteTable; + } + // ---------------------------------------------------------------------------- // memory tracking functions + void wxLuaState::addToTrackedMemoryList(wxObject *pObject) + { + wxCHECK_RET(Ok() && pObject, wxT("Invalid wxLuaState or wxObject to track")); + M_WXLSTATEDATA->m_pTrackedList->Put((int)pObject, pObject); + } + bool wxLuaState::removeTrackedMemory(void *pObject, bool fDelete) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")) wxObject *pDeleteObject = M_WXLSTATEDATA->m_pTrackedList->Delete((int) pObject); ! bool result = pDeleteObject != NULL; ! ! if (fDelete && (pDeleteObject != NULL)) delete pDeleteObject; ! return result; } ! void wxLuaState::addToTrackedWindowList(wxWindow *pWindow) { ! wxCHECK_RET(Ok() && pWindow, wxT("Invalid wxLuaState or wxWindow")); ! ! // don't track these windows since they're supposed to be attached ! if (wxDynamicCast(pWindow, wxMenuBar) != NULL) return; ! if (wxDynamicCast(pWindow, wxToolBar) != NULL) return; ! ! // only need to track parent window, it deletes children for us ! if (!isWindowTracked(pWindow)) ! { ! M_WXLSTATEDATA->m_pWindowList->Append(pWindow); ! new wxLuaCallback(*this, 3, pWindow->GetId(), wxEVT_DESTROY, pWindow->GetEventHandler()); ! } } ! void wxLuaState::removeTrackedWindow(wxWindow *pWindow) { ! wxCHECK_RET(Ok() && pWindow, wxT("Invalid wxLuaState or wxWindow")); ! M_WXLSTATEDATA->m_pWindowList->DeleteObject(pWindow); ! } ! ! bool wxLuaState::isWindowTracked(wxWindow *win) const ! { ! wxCHECK_MSG(Ok() && win, false, wxT("Invalid wxLuaState or wxWindow")); ! wxWindow *parent = win; + wxList* list = M_WXLSTATEDATA->m_pWindowList; while (parent) *************** *** 702,722 **** } - void wxLuaState::addToTrackedWindowList(wxWindow *pWindow) - { - wxCHECK_RET(pWindow, wxT("Invalid lua state and/or wxWindow")); - wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")) - - // don't track these windows since they're supposed to be attached - if (wxDynamicCast(pWindow, wxMenuBar) != NULL) return; - if (wxDynamicCast(pWindow, wxToolBar) != NULL) return; - - // only need to track parent window, it deletes children for us - if (!wxLuaIsParentWindowTracked(M_WXLSTATEDATA->m_pWindowList, pWindow)) - { - M_WXLSTATEDATA->m_pWindowList->Append(pWindow); - new wxLuaCallback(*this, 3, pWindow->GetId(), wxEVT_DESTROY, pWindow->GetEventHandler()); - } - } - // ---------------------------------------------------------------------------- // wxLua Lua Registry Table Functions --- 751,754 ---- *************** *** 738,742 **** int nTop = lua_gettop(L); ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result --- 770,774 ---- int nTop = lua_gettop(L); ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result *************** *** 788,792 **** bool ret = false; // false indicates index out of range ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 820,824 ---- bool ret = false; // false indicates index out of range ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 821,825 **** bool ret = false; // false indicates index out of range ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 853,857 ---- bool ret = false; // false indicates index out of range ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 845,849 **** lua_State* L = M_WXLSTATEDATA->m_lua_State; ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 877,881 ---- lua_State* L = M_WXLSTATEDATA->m_lua_State; ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 1025,1028 **** --- 1057,1072 ---- // wxLua get data type + void wxLuaState::tpushstring(const char *str) + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")) + lua_pushstring(M_WXLSTATEDATA->m_lua_State, str); + } + + void wxLuaState::tpushliteralstring(const char *str, size_t len) + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")) + lua_pushlstring(M_WXLSTATEDATA->m_lua_State, str, len); + } + void* wxLuaState::getuserdatatype(int iParam, int iParamTag) { *************** *** 1055,1059 **** error: ! terror(wx2lua(wxString::Format(_("wxLua: Unexpected user defined data type %d for parameter %d."), iParamTag, iParam))); return NULL; } --- 1099,1104 ---- error: ! ! terror(wx2lua(wxString::Format(_("wxLua: Unexpected user defined data type %d '%s' for parameter %d."), iParamTag, lua2wx(GetLuaTagName(iParamTag)).c_str(), iParam))); return NULL; } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlbind.cpp 26 Nov 2005 08:46:57 -0000 1.3 --- wxlbind.cpp 28 Nov 2005 06:05:08 -0000 1.4 *************** *** 19,33 **** #ifndef WX_PRECOMP #include "wx/wx.h" - #include "wx/app.h" #endif - #include "wx/datetime.h" - - #include "../../../bindings/wxwidgets/luasetup.h.in" // get the base library setup parameters - #include "wxlua/include/internal.h" - #include "wxlua/include/wxlcallb.h" #include "wxlua/include/wxlbind.h" ! #include "wxbind/include/wxbind.h" ! #include "wxlua/include/wxlintrp.h" #include "wx/listimpl.cpp" --- 19,26 ---- #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wxlua/include/wxlbind.h" ! #include "wxlua/include/internal.h" #include "wx/listimpl.cpp" *************** *** 52,56 **** } - // ---------------------------------------------------------------------------- // wxLuaBinding --- 45,48 ---- *************** *** 59,65 **** IMPLEMENT_CLASS(wxLuaBinding, wxObject) ! wxLuaBinding::wxLuaBinding() ! : ! wxObject(), pfGetClassList(NULL), pfGetDefineList(NULL), --- 51,55 ---- IMPLEMENT_CLASS(wxLuaBinding, wxObject) ! wxLuaBinding::wxLuaBinding() : wxObject(), pfGetClassList(NULL), pfGetDefineList(NULL), *************** *** 67,80 **** 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), --- 57,65 ---- 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), *************** *** 108,112 **** // create references table in registry ! // lua_pushstring(L, WXLUAREFERENCES); // lua_newtable(L); // lua_rawset(L, LUA_REGISTRYINDEX); --- 93,97 ---- // create references table in registry ! // lua_pushstring(L, wxLuaReferences); // lua_newtable(L); // lua_rawset(L, LUA_REGISTRYINDEX); *************** *** 163,167 **** //wxPrintf(wxT("RegisterGenClasses %d '%s'\n"), iTag, lua2wx(pClass->name).c_str()); ! for (unsigned iFunction = 0; iFunction < funcCount; iFunction++) { tsettagmethod (L, iTag, funcTable[iFunction].name, funcTable[iFunction].func, (void *) pClass); --- 148,152 ---- //wxPrintf(wxT("RegisterGenClasses %d '%s'\n"), iTag, lua2wx(pClass->name).c_str()); ! for (size_t iFunction = 0; iFunction < funcCount; iFunction++) { tsettagmethod (L, iTag, funcTable[iFunction].name, funcTable[iFunction].func, (void *) pClass); *************** *** 183,187 **** // register all the builtin functions m_builtinList = (*pfGetBuiltinList)(m_builtinCount); ! for (size_t iBuiltin= 0; iBuiltin < m_builtinCount; ++iBuiltin) { WXLUAMETHOD *pMethod = m_builtinList + iBuiltin; --- 168,172 ---- // register all the builtin functions m_builtinList = (*pfGetBuiltinList)(m_builtinCount); ! for (size_t iBuiltin = 0; iBuiltin < m_builtinCount; ++iBuiltin) { WXLUAMETHOD *pMethod = m_builtinList + iBuiltin; *************** *** 245,252 **** bool wxLuaBinding::SetBaseClassTag(WXLUACLASS *pClass) { ! if (!pClass->baseclass) ! return false; ! ! if (!m_classList) return false; --- 230,234 ---- bool wxLuaBinding::SetBaseClassTag(WXLUACLASS *pClass) { ! if (!pClass->baseclass || !m_classList) return false; Index: wxlintrp.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlintrp.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlintrp.cpp 26 Nov 2005 08:46:57 -0000 1.3 --- wxlintrp.cpp 28 Nov 2005 06:05:08 -0000 1.4 *************** *** 262,266 **** // FIXME - for select event types we don't want to do anything ! wxEventType evtType = luaInterpreter->GetwxLuaState().GetLuaStateRefData()->m_inEventType; if ((evtType != -1)) //(evtType == wxEVT_IDLE) && (evtType == wxEVT_PAINT) && --- 262,266 ---- // FIXME - for select event types we don't want to do anything ! wxEventType evtType = luaInterpreter->GetwxLuaState().GetInEventType(); if ((evtType != -1)) //(evtType == wxEVT_IDLE) && (evtType == wxEVT_PAINT) && Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxlcallb.cpp 28 Nov 2005 01:28:55 -0000 1.4 --- wxlcallb.cpp 28 Nov 2005 06:05:08 -0000 1.5 *************** *** 89,93 **** { event.Skip(); ! wxlState.GetLuaStateRefData()->m_pWindowList->DeleteObject((wxWindow*)event.GetEventObject()); // delete the reference to this handler since we're clearing it wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(this); --- 89,93 ---- { event.Skip(); ! wxlState.removeTrackedWindow((wxWindow*)event.GetEventObject()); // delete the reference to this handler since we're clearing it wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(this); *************** *** 119,123 **** theCallback->CallFunction(&event); ! wxlState.GetLuaStateRefData()->m_inEventType = -1; } --- 119,123 ---- theCallback->CallFunction(&event); ! wxlState.GetLuaStateRefData()->m_inEventType = wxEVT_NULL; } *************** *** 188,192 **** // get a reference to the destroy handler table ! if (m_wxlState.tget(m_wxlState.GetLuaStateRefData()->m_wxDeleteTable)) { // create a reference to object --- 188,192 ---- // get a reference to the destroy handler table ! if (m_wxlState.tget(m_wxlState.GetLuaDeleteTable())) { // create a reference to object *************** *** 238,242 **** // Note: do not remove from m_pDestroyHandlerList here, wait 'till destructor ! if (m_wxlState.tget(m_wxlState.GetLuaStateRefData()->m_wxDeleteTable)) { lua_State* L = m_wxlState.GetLuaState(); --- 238,242 ---- // Note: do not remove from m_pDestroyHandlerList here, wait 'till destructor ! if (m_wxlState.tget(m_wxlState.GetLuaDeleteTable())) { lua_State* L = m_wxlState.GetLuaState(); |
From: John L. <jr...@us...> - 2005-11-28 06:05:17
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27690/wxLua/bindings Modified Files: genwxbind.lua Log Message: Use wxLuaState in the bindings #define tpushliteralstring replaced with tpushwxLuaReferences tpushwxLuaNull #define caused linking problems w/ gcc remove unused vars in wxLuaStateRefData Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** genwxbind.lua 26 Nov 2005 08:46:57 -0000 1.8 --- genwxbind.lua 28 Nov 2005 06:05:08 -0000 1.9 *************** *** 2310,2315 **** encapsulationBinding = { ! Declaration="DECLARE_ENCAPSULATION("..parseObject.Name..")\n", ! Implementation="IMPLEMENT_ENCAPSULATION("..parseObject.Name..")\n", Condition=encapcondition } --- 2310,2315 ---- encapsulationBinding = { ! Declaration="wxLUA_DECLARE_ENCAPSULATION("..parseObject.Name..")\n", ! Implementation="wxLUA_IMPLEMENT_ENCAPSULATION("..parseObject.Name..")\n", Condition=encapcondition } *************** *** 2427,2434 **** table.insert(codeList, "static int LUACALL "..parseObject.Name.."_"..memberGetFunc.."(lua_State *L)\n") table.insert(codeList, "{\n") if (comment) then table.insert(codeList, " // get this\n") end ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *) getuserdatatype(L, 1, s_"..MakeClassVar(parseObject.Name)..");\n") if memberType == "wxString" then --- 2427,2435 ---- table.insert(codeList, "static int LUACALL "..parseObject.Name.."_"..memberGetFunc.."(lua_State *L)\n") table.insert(codeList, "{\n") + table.insert(codeList, " wxLuaState wxlState(L);\n") if (comment) then table.insert(codeList, " // get this\n") end ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *) wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name)..");\n") if memberType == "wxString" then *************** *** 2443,2449 **** -- if string.find(member.Name, "::") then ! -- table.insert(codeList, " pushuserdatatype(L, s_"..MakeClassVar(memberType)..", "..member.Name..");\n") -- else ! table.insert(codeList, " pushuserdatatype(L, s_"..MakeClassVar(memberType)..", &self->"..member.Name..");\n") -- end elseif not intrinsic then --- 2444,2450 ---- -- if string.find(member.Name, "::") then ! -- table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(memberType)..", "..member.Name..");\n") -- else ! table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(memberType)..", &self->"..member.Name..");\n") -- end elseif not intrinsic then *************** *** 2452,2456 **** end ! table.insert(codeList, " pushuserdatatype(L, s_"..MakeClassVar(memberType)..", self->"..member.Name..");\n") elseif type == "BOOL" or type == "bool" then if (comment) then --- 2453,2457 ---- end ! table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(memberType)..", self->"..member.Name..");\n") elseif type == "BOOL" or type == "bool" then if (comment) then *************** *** 2470,2474 **** table.insert(codeList, " return 1;\n") table.insert(codeList, "}\n\n") - -- bind method methodBinding = --- 2471,2474 ---- *************** *** 2500,2533 **** table.insert(codeList, "static int LUACALL "..parseObject.Name.."_"..memberSetFunc.."(lua_State *L)\n") table.insert(codeList, "{\n") if memberType == "wxString" then if (comment) then table.insert(codeList, " // get the string value\n") end ! table.insert(codeList, " wxString val = lua2wx(getstringtype(L, 2));\n") elseif not intrinsic and (not memberPtr or memberPtr == "&") then if (comment) then table.insert(codeList, " // get the data type value\n") end ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)getuserdatatype(L, 2, s_"..MakeClassVar(memberType).." );\n") elseif not intrinsic then if (comment) then table.insert(codeList, " // get the data type value\n") end ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)getuserdatatype(L, 2, s_"..MakeClassVar(memberType).." );\n") elseif memberType == "BOOL" or memberType == "bool" then if (comment) then table.insert(codeList, " // get the boolean value\n") end ! table.insert(codeList, " bool val = getbooleantype(L, 2);\n") else if (comment) then table.insert(codeList, " // get the number value\n") end ! table.insert(codeList, " "..memberType.." val = getnumbertype(L, 2);\n") end if (comment) then table.insert(codeList, " // get this\n") end ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *) getuserdatatype(L, 1, s_"..MakeClassVar(parseObject.Name)..");\n") if not intrinsic and (not memberPtr or memberPtr == "&") then --- 2500,2535 ---- table.insert(codeList, "static int LUACALL "..parseObject.Name.."_"..memberSetFunc.."(lua_State *L)\n") table.insert(codeList, "{\n") + table.insert(codeList, " wxLuaState wxlState(L);\n") + if memberType == "wxString" then if (comment) then table.insert(codeList, " // get the string value\n") end ! table.insert(codeList, " wxString val = lua2wx(wxlState.getstringtype(2));\n") elseif not intrinsic and (not memberPtr or memberPtr == "&") then if (comment) then table.insert(codeList, " // get the data type value\n") end ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxlState.getuserdatatype(2, s_"..MakeClassVar(memberType).." );\n") elseif not intrinsic then if (comment) then table.insert(codeList, " // get the data type value\n") end ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxlState.getuserdatatype(2, s_"..MakeClassVar(memberType).." );\n") elseif memberType == "BOOL" or memberType == "bool" then if (comment) then table.insert(codeList, " // get the boolean value\n") end ! table.insert(codeList, " bool val = wxlState.getbooleantype(2);\n") else if (comment) then table.insert(codeList, " // get the number value\n") end ! table.insert(codeList, " "..memberType.." val = wxlState.getnumbertype(2);\n") end if (comment) then table.insert(codeList, " // get this\n") end ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *)wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name)..");\n") if not intrinsic and (not memberPtr or memberPtr == "&") then *************** *** 2808,2812 **** end ! if (indirectionCount == 1) and argPtr == "[]" then argTypeWithAttrib = argTypeWithAttrib.." *" --- 2810,2814 ---- end ! if (indirectionCount == 1) and (argPtr == "[]") then argTypeWithAttrib = argTypeWithAttrib.." *" *************** *** 2817,2830 **** end ! argItem = "tostringarray(L, "..argNum..", count)" declare = "int count = 0; wxLuaSmartStringArray ptr; "..argTypeWithAttrib.." "..argName.."; ptr = " elseif not intrinsic then ! argItem = "("..argTypeWithAttrib..") getuserdatatype(L, "..argNum..", s_"..MakeClassVar(argType)..")" else ! argItem = "("..argTypeWithAttrib..") ttouserdata(L, "..argNum..")" end elseif indirectionCount == 1 and argPtr == "*" then if argType == "wxString" then ! argItem = "lua2wx(getstringtype(L, "..argNum.."))" -- Default String Value --- 2819,2832 ---- end ! argItem = "wxlState.tostringarray("..argNum..", count)" declare = "int count = 0; wxLuaSmartStringArray ptr; "..argTypeWithAttrib.." "..argName.."; ptr = " elseif not intrinsic then ! argItem = "("..argTypeWithAttrib..") wxlState.getuserdatatype("..argNum..", s_"..MakeClassVar(argType)..")" else ! argItem = "("..argTypeWithAttrib..") wxlState.ttouserdata("..argNum..")" end elseif indirectionCount == 1 and argPtr == "*" then if argType == "wxString" then ! argItem = "lua2wx(wxlState.getstringtype("..argNum.."))" -- Default String Value *************** *** 2847,2853 **** if not intrinsic then ! argItem = "("..argTypeWithAttrib..") getuserdatatype(L, "..argNum..", s_"..MakeClassVar(argType)..")" else ! argItem = "("..argTypeWithAttrib..") ttouserdata(L, "..argNum..")" end end --- 2849,2855 ---- if not intrinsic then ! argItem = "("..argTypeWithAttrib..")wxlState.getuserdatatype("..argNum..", s_"..MakeClassVar(argType)..")" else ! argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" end end *************** *** 2855,2866 **** if not intrinsic then argTypeWithAttrib = argTypeWithAttrib.." **" ! argItem = "("..argTypeWithAttrib..") getuserdatatype(L, "..argNum..", s_"..MakeClassVar(argType)..")" else argTypeWithAttrib = argTypeWithAttrib.." *" ! argItem = "("..argTypeWithAttrib..") ttouserdata(L, "..argNum..")" end elseif indirectionCount == 1 and argPtr == "&" then if argType == "wxString" then ! argItem = "lua2wx(getstringtype(L, "..argNum.."))" -- Default String Value --- 2857,2868 ---- if not intrinsic then argTypeWithAttrib = argTypeWithAttrib.." **" ! argItem = "("..argTypeWithAttrib..")wxlState.getuserdatatype("..argNum..", s_"..MakeClassVar(argType)..")" else argTypeWithAttrib = argTypeWithAttrib.." *" ! argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" end elseif indirectionCount == 1 and argPtr == "&" then if argType == "wxString" then ! argItem = "lua2wx(wxlState.getstringtype("..argNum.."))" -- Default String Value *************** *** 2877,2883 **** argTypeWithAttrib = argTypeWithAttrib.." *" if not intrinsic then ! argItem = "("..argTypeWithAttrib..") getuserdatatype(L, "..argNum..", s_"..MakeClassVar(argType)..")" else ! argItem = "("..argTypeWithAttrib..") ttouserdata(L, "..argNum..")" end --- 2879,2885 ---- argTypeWithAttrib = argTypeWithAttrib.." *" if not intrinsic then ! argItem = "("..argTypeWithAttrib..")wxlState.getuserdatatype("..argNum..", s_"..MakeClassVar(argType)..")" else ! argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" end *************** *** 2889,2893 **** elseif indirectionCount == 0 then if argType == "wxString" then ! argItem = "lua2wx(getstringtype(L, "..argNum.."))" -- Default String Value --- 2891,2895 ---- elseif indirectionCount == 0 then if argType == "wxString" then ! argItem = "lua2wx(wxlState.getstringtype("..argNum.."))" -- Default String Value *************** *** 2902,2910 **** end elseif argType == "bool" or argType == "BOOL" then ! argItem = "getbooleantype(L, "..argNum..")" elseif isEnum(argType) then ! argItem = "("..argType..") getenumerationtype(L, "..argNum..")" else ! argItem = "("..argType..") getnumbertype(L, "..argNum..")" end else --- 2904,2912 ---- end elseif argType == "bool" or argType == "BOOL" then ! argItem = "wxlState.getbooleantype("..argNum..")" elseif isEnum(argType) then ! argItem = "("..argType..")wxlState.getenumerationtype("..argNum..")" else ! argItem = "("..argType..")wxlState.getnumbertype("..argNum..")" end else *************** *** 3005,3008 **** --- 3007,3011 ---- table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") + table.insert(codeList, " wxLuaState wxlState(L);\n") -- determine function return type *************** *** 3124,3128 **** if (comment) then table.insert(codeList, " // add to tracked window list\n") end table.insert(codeList, " if (returns && returns->IsKindOf(CLASSINFO(wxWindow)))\n") ! table.insert(codeList, " addToTrackedWindowList(L, (wxWindow*)returns);\n") end --- 3127,3131 ---- if (comment) then table.insert(codeList, " // add to tracked window list\n") end table.insert(codeList, " if (returns && returns->IsKindOf(CLASSINFO(wxWindow)))\n") ! table.insert(codeList, " wxlState.addToTrackedWindowList((wxWindow*)returns);\n") end *************** *** 3130,3134 **** table.insert(codeList, " // push the constructed class pointer\n") end ! table.insert(codeList, " pushuserdatatype(L, s_"..MakeClassVar(parseObject.Name)..", returns );\n") table.insert(codeList, "\n return 1;\n") --- 3133,3137 ---- table.insert(codeList, " // push the constructed class pointer\n") end ! table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(parseObject.Name)..", returns );\n") table.insert(codeList, "\n return 1;\n") *************** *** 3145,3149 **** end ! table.insert(codeList, " "..parseObject.Name.." * self = ( "..parseObject.Name.." * ) getuserdatatype(L, 1, s_"..MakeClassVar(parseObject.Name).." );\n") -- static member function? --- 3148,3152 ---- end ! table.insert(codeList, " "..parseObject.Name.." * self = ( "..parseObject.Name.." * )wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name).." );\n") -- static member function? *************** *** 3208,3212 **** table.insert(codeList, " // push the result datatype\n") end ! table.insert(codeList, " pushuserdatatype(L, s_"..MakeClassVar(memberType)..", returns );\n") elseif member.DataType == "BOOL" or member.DataType == "bool" then if (comment) then --- 3211,3215 ---- table.insert(codeList, " // push the result datatype\n") end ! table.insert(codeList, " wxlState.pushuserdatatype(s_"..MakeClassVar(memberType)..", returns );\n") elseif member.DataType == "BOOL" or member.DataType == "bool" then if (comment) then *************** *** 3333,3337 **** codeList = {} table.insert(codeList, "static int LUACALL "..MakeVar(parseObject.Name).."_destructor(lua_State *L)\n{\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *) getuserdatatype(L, 1, s_"..MakeClassVar(parseObject.Name)..");\n") if (comment) then --- 3336,3341 ---- codeList = {} table.insert(codeList, "static int LUACALL "..MakeVar(parseObject.Name).."_destructor(lua_State *L)\n{\n") ! table.insert(codeList, " wxLuaState wxlState(L);\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name)..");\n") if (comment) then *************** *** 3360,3364 **** codeList = {} table.insert(codeList, "static int LUACALL "..MakeVar(parseObject.Name).."_Delete(lua_State *L)\n{\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *) getuserdatatype(L, 1, s_"..MakeClassVar(parseObject.Name)..");\n") if (comment) then --- 3364,3369 ---- codeList = {} table.insert(codeList, "static int LUACALL "..MakeVar(parseObject.Name).."_Delete(lua_State *L)\n{\n") ! table.insert(codeList, " wxLuaState wxlState(L);\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.getuserdatatype(1, s_"..MakeClassVar(parseObject.Name)..");\n") if (comment) then |
From: John L. <jr...@us...> - 2005-11-28 06:05:17
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27690/wxLua/modules/wxlua/include Modified Files: internal.h wxlbind.h wxlstate.h Log Message: Use wxLuaState in the bindings #define tpushliteralstring replaced with tpushwxLuaReferences tpushwxLuaNull #define caused linking problems w/ gcc remove unused vars in wxLuaStateRefData Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxlbind.h 26 Nov 2005 08:46:57 -0000 1.2 --- wxlbind.h 28 Nov 2005 06:05:08 -0000 1.3 *************** *** 87,94 **** }; ! typedef WXLUACLASS* (*GetClassListFunction)(size_t &); typedef WXLUADEFINE* (*GetDefineListFunction)(size_t &); //typedef WXLUASTRING* (*GetDefineListFunction)(size_t &); FIXME - use this ! typedef WXLUAEVENT* (*GetEventListFunction)(size_t &); typedef WXLUAOBJECT* (*GetObjectListFunction)(size_t &); typedef WXLUAMETHOD* (*GetBuiltinListFunction)(size_t &); --- 87,94 ---- }; ! typedef WXLUACLASS* (*GetClassListFunction)(size_t &); typedef WXLUADEFINE* (*GetDefineListFunction)(size_t &); //typedef WXLUASTRING* (*GetDefineListFunction)(size_t &); FIXME - use this ! typedef WXLUAEVENT* (*GetEventListFunction)(size_t &); typedef WXLUAOBJECT* (*GetObjectListFunction)(size_t &); typedef WXLUAMETHOD* (*GetBuiltinListFunction)(size_t &); *************** *** 137,141 **** 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 --- 137,141 ---- 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 *************** *** 152,164 **** // binding objects ! size_t m_classCount; ! WXLUACLASS* m_classList; ! size_t m_defineCount; WXLUADEFINE* m_defineList; ! size_t m_eventCount; ! WXLUAEVENT* m_eventList; ! size_t m_objectCount; WXLUAOBJECT* m_objectList; ! size_t m_builtinCount; WXLUAMETHOD* m_builtinList; --- 152,164 ---- // binding objects ! size_t m_classCount; ! WXLUACLASS* m_classList; ! size_t m_defineCount; WXLUADEFINE* m_defineList; ! size_t m_eventCount; ! WXLUAEVENT* m_eventList; ! size_t m_objectCount; WXLUAOBJECT* m_objectList; ! size_t m_builtinCount; WXLUAMETHOD* m_builtinList; Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxlstate.h 26 Nov 2005 08:46:57 -0000 1.4 --- wxlstate.h 28 Nov 2005 06:05:08 -0000 1.5 *************** *** 43,47 **** } ! //#include "wxlua/include/internal.h" #include "wxlua/include/wxlbind.h" --- 43,47 ---- } ! #include "wxlua/include/wxldefs.h" #include "wxlua/include/wxlbind.h" *************** *** 54,58 **** //---------------------------------------------------------------------------- // wxLuaStateRefData - the internal data for the wxLuaState. ! // please use the wxLuaStare accessor functions //---------------------------------------------------------------------------- --- 54,58 ---- //---------------------------------------------------------------------------- // wxLuaStateRefData - the internal data for the wxLuaState. ! // please use the wxLuaState accessor functions //---------------------------------------------------------------------------- *************** *** 80,91 **** bool m_typesRegistered; // Is the binding registered - int m_startTag; // The first wxLua allocated lua tag - int m_lastTag; // The last wxLua lua tag of registered classes int m_functionTag; // The lua tag for function objects. - int m_wxLuaTable; // The lua tag for the wxLua private tables int m_wxLuaNull; // The lua tag for wxLuaNull (for NULL pointers) int m_wxDeleteTable; // The lua tag for the wxWindow destroy tracking table ! wxEventType m_inEventType; // wxEventType set when in event, else -1 wxHashTable* m_pDerivedList; // derived objects. --- 80,88 ---- bool m_typesRegistered; // Is the binding registered int m_functionTag; // The lua tag for function objects. int m_wxLuaNull; // The lua tag for wxLuaNull (for NULL pointers) int m_wxDeleteTable; // The lua tag for the wxWindow destroy tracking table ! wxEventType m_inEventType; // wxEventType set when in event, else wxEVT_NULL wxHashTable* m_pDerivedList; // derived objects. *************** *** 113,116 **** --- 110,114 ---- { WXLUASTATE_ATTACH = 1, // Attach to a currently created lua_State + // refing the existing wxLuaStateRefData WXLUASTATE_SETSTATE = 2 // Only set the lua_State and don't close it // when destroyed *************** *** 136,145 **** bool Create(wxLuaStateRefData* refData); ! // Is this wxLuaState valid, has refed data bool Ok() const; // Destroy the refed data void Destroy() { UnRef(); } ! // bool CloseLuaState(bool force); --- 134,144 ---- bool Create(wxLuaStateRefData* refData); ! // Is this wxLuaState valid, has refed data and it's lua_State is created bool Ok() const; // Destroy the refed data void Destroy() { UnRef(); } ! // Close the lua_State and if 'force' close all attached wxWindows ! // if not force then popup dialog to ask if windows should be destroyed. bool CloseLuaState(bool force); *************** *** 149,152 **** --- 148,155 ---- wxLuaStateRefData* GetLuaStateRefData() const { return (wxLuaStateRefData*)GetRefData(); } + + // Get the wxEventType currently + wxEventType GetInEventType() const; + // ----------------------------------------------------------------------- // Binding functions *************** *** 160,173 **** const WXLUACLASS * GetBaseLuaClass(int iClassTag); bool IsDerivedClass(int iClassTag, int iBaseClassTag); - const WXLUAEVENT * GetLuaEvent(wxEvent *pEvent); void GarbageCollectWindows(bool closeWindows); // ----------------------------------------------------------------------- // memory tracking functions ! bool removeTrackedMemory(void *pObject, bool fDelete); void addToTrackedMemoryList(wxObject *pObject); ! void addToTrackedWindowList(wxWindow *); // ----------------------------------------------------------------------- --- 163,186 ---- const WXLUACLASS * GetBaseLuaClass(int iClassTag); bool IsDerivedClass(int iClassTag, int iBaseClassTag); const WXLUAEVENT * GetLuaEvent(wxEvent *pEvent); void GarbageCollectWindows(bool closeWindows); + // Get the binding list used to initialize this class + wxLuaBindingList* GetLuaBindingList() const; + bool GetTypesRegistered() const; // Is the binding registered + int GetLuaFunctionTag() const; // The lua tag for function objects. + int GetLuaNull() const; // The lua tag for wxLuaNull (for NULL pointers) + int GetLuaDeleteTable() const; // The lua tag for the wxWindow destroy tracking table + // ----------------------------------------------------------------------- // memory tracking functions ! void addToTrackedMemoryList(wxObject *pObject); ! bool removeTrackedMemory(void *pObject, bool fDelete); ! ! void addToTrackedWindowList(wxWindow *win); ! void removeTrackedWindow(wxWindow *win); ! bool isWindowTracked(wxWindow *win) const; // ----------------------------------------------------------------------- *************** *** 202,205 **** --- 215,222 ---- // wxLua get data type + // push the string onto the stack + void tpushliteralstring(const char *str, size_t len); + void tpushstring(const char *str); + // Return a pointer to the object that corresponds to the specified stack // index and tag Index: internal.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/internal.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** internal.h 28 Nov 2005 01:28:54 -0000 1.9 --- internal.h 28 Nov 2005 06:05:08 -0000 1.10 *************** *** 29,34 **** // with standard lua functions. - #define WXLUAREFERENCES "wxLuaReferences" - #define wxFileRead read #define wxFileWrite write --- 29,32 ---- *************** *** 87,91 **** // ---------------------------------------------------------------------------- ! #define DECLARE_ENCAPSULATION(theObject) \ class theObject; \ void LUACALL addToTrackedMemoryList(lua_State *, theObject *); \ --- 85,89 ---- // ---------------------------------------------------------------------------- ! #define wxLUA_DECLARE_ENCAPSULATION(theObject) \ class theObject; \ void LUACALL addToTrackedMemoryList(lua_State *, theObject *); \ *************** *** 99,103 **** }; ! #define IMPLEMENT_ENCAPSULATION(theObject) \ theObject##Object::theObject##Object(theObject *p##theObject) : \ m_p##theObject(p##theObject) \ --- 97,101 ---- }; ! #define wxLUA_IMPLEMENT_ENCAPSULATION(theObject) \ theObject##Object::theObject##Object(theObject *p##theObject) : \ m_p##theObject(p##theObject) \ *************** *** 113,118 **** wxLuaState wxlState(L); \ wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); \ - if (wxlState.GetLuaStateRefData()->m_pTrackedList == NULL) \ - wxlState.GetLuaStateRefData()->m_pTrackedList = new wxHashTable(wxKEY_INTEGER); \ wxlState.GetLuaStateRefData()->m_pTrackedList->Put((int)p##theObject, new theObject##Object(p##theObject)); \ } --- 111,114 ---- *************** *** 188,191 **** --- 184,191 ---- }; + // ---------------------------------------------------------------------------- + // wxLuaTreeItemData + // ---------------------------------------------------------------------------- + class wxLuaTreeItemData : public wxTreeItemData { *************** *** 295,304 **** // if pClass is non-null set the upvalue of the function to the supplied class bool LUACALL tsettagmethod(lua_State *L, int tag, const char *method, lua_CFunction func, void *pClass = NULL); - #define tpushliteralstring(L, n) \ - lua_pushlstring(L, n, sizeof(n)-1) #define TLUA_NOTAG 0 class WXDLLIMPEXP_WXLUA wxLuaCheckStack { --- 295,310 ---- // if pClass is non-null set the upvalue of the function to the supplied class bool LUACALL tsettagmethod(lua_State *L, int tag, const char *method, lua_CFunction func, void *pClass = NULL); + // push the wxLuaReferences string onto the stack + void LUACALL tpushwxLuaReferences(lua_State *L); + // push the wxLuaNull string onto the stack + void LUACALL tpushwxLuaNull(lua_State *L); #define TLUA_NOTAG 0 + // ---------------------------------------------------------------------------- + // wxLuaCheckStack - dumps the contents of the lua_State + // ---------------------------------------------------------------------------- + class WXDLLIMPEXP_WXLUA wxLuaCheckStack { *************** *** 353,357 **** }; - // ---------------------------------------------------------------------------- // Used to create a set of standard bitmaps for wxLua --- 359,362 ---- |
From: John L. <jr...@us...> - 2005-11-28 06:05:17
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27690/wxLua/bindings/wxwidgets Modified Files: wx.rules Log Message: Use wxLuaState in the bindings #define tpushliteralstring replaced with tpushwxLuaReferences tpushwxLuaNull #define caused linking problems w/ gcc remove unused vars in wxLuaStateRefData Index: wx.rules =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx.rules,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wx.rules 26 Nov 2005 08:46:57 -0000 1.6 --- wx.rules 28 Nov 2005 06:05:08 -0000 1.7 *************** *** 76,80 **** " }\n", "\n", ! " tpushliteralstring(L, \"wxNull\");\n", " tpushusertag(L, NULL, wxLS.GetLuaStateRefData()->m_wxLuaNull);\n", " lua_rawset(L, luaTable);\n", --- 76,80 ---- " }\n", "\n", ! " tpushwxLuaNull(L);\n", " tpushusertag(L, NULL, wxLS.GetLuaStateRefData()->m_wxLuaNull);\n", " lua_rawset(L, luaTable);\n", |
From: John L. <jr...@us...> - 2005-11-28 01:29:27
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17359/wxLua/modules/wxlua/include Modified Files: internal.h wxlcallb.h wxlintrp.h Log Message: use wxMemorySize in >2.6 in defsutils.i fix removing callbacks (segfault on exit) Index: wxlintrp.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlintrp.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlintrp.h 26 Nov 2005 08:46:57 -0000 1.3 --- wxlintrp.h 28 Nov 2005 01:28:54 -0000 1.4 *************** *** 32,36 **** class WXDLLIMPEXP_WXLUA wxLuaEvent; - class WXDLLIMPEXP_WXLUA wxLuaStateVariables; class WXDLLIMPEXP_WXLUA wxLuaInterpreter; --- 32,35 ---- *************** *** 44,48 **** extern wxLuaInterpreter *wxFindLuaInterpreter(lua_State *L); - extern wxLuaStateVariables *wxFindLuaStateVariables(lua_State *L); //----------------------------------------------------------------------------- --- 43,46 ---- Index: wxlcallb.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlcallb.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxlcallb.h 26 Nov 2005 08:46:57 -0000 1.2 --- wxlcallb.h 28 Nov 2005 01:28:54 -0000 1.3 *************** *** 16,21 **** #include "wxlua/include/wxldefs.h" - class WXDLLIMPEXP_WXLUA wxLuaStateVariables; - // ---------------------------------------------------------------------------- // wxLuaCallback - proxy class to pass a reference to a lua function --- 16,19 ---- *************** *** 34,38 **** virtual ~wxLuaCallback(); ! void ClearState(); wxLuaState GetwxLuaState() const { return m_wxlState; } --- 32,36 ---- virtual ~wxLuaCallback(); ! void ClearLuaState() { m_wxlState.UnRef(); } wxLuaState GetwxLuaState() const { return m_wxlState; } *************** *** 48,56 **** void CallFunction(wxEvent *pEvent); ! // reference to the routine to call int m_routine; ! // store the state variables since we're added to a list of callbacks. ! // The lua_State is NULLed when the window (handler) is destroyed, ! // but we still want to remove us from the state vars callback list. wxLuaState m_wxlState; --- 46,53 ---- void CallFunction(wxEvent *pEvent); ! // reference to the lua routine to call int m_routine; ! ! // store the wxLuaState since we're added to a list of it's callbacks. wxLuaState m_wxlState; *************** *** 77,81 **** virtual ~wxLuaDestroyCallback(); ! void ClearState() { m_wxlState.UnRef(); } wxLuaState GetwxLuaState() const { return m_wxlState; } --- 74,78 ---- virtual ~wxLuaDestroyCallback(); ! void ClearLuaState() { m_wxlState.UnRef(); } wxLuaState GetwxLuaState() const { return m_wxlState; } *************** *** 90,95 **** // Lua state instance wxLuaState m_wxlState; - // store the state variables see wxLuaCallback for reasoning - wxLuaStateVariables *m_luaStateVars; wxEvtHandler *m_pHandler; int m_id; --- 87,90 ---- Index: internal.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/internal.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** internal.h 26 Nov 2005 08:46:57 -0000 1.8 --- internal.h 28 Nov 2005 01:28:54 -0000 1.9 *************** *** 36,41 **** #define wxFileWriteAppend write_append ! #define wxDataObjectGet wxDataObject::Get ! #define wxDataObjectSet wxDataObject::Set #if defined(__WXGTK__) --- 36,41 ---- #define wxFileWriteAppend write_append ! //#define wxDataObjectGet wxDataObject::Get ! //#define wxDataObjectSet wxDataObject::Set #if defined(__WXGTK__) *************** *** 113,119 **** wxLuaState wxlState(L); \ wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); \ ! if (wxlState.GetLuaStateRefData()->m_pTrackedList == NULL) { \ wxlState.GetLuaStateRefData()->m_pTrackedList = new wxHashTable(wxKEY_INTEGER); \ ! wxlState.GetLuaStateRefData()->m_pTrackedList->Put((int)p##theObject, new theObject##Object(p##theObject)); } \ } --- 113,119 ---- wxLuaState wxlState(L); \ wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); \ ! if (wxlState.GetLuaStateRefData()->m_pTrackedList == NULL) \ wxlState.GetLuaStateRefData()->m_pTrackedList = new wxHashTable(wxKEY_INTEGER); \ ! wxlState.GetLuaStateRefData()->m_pTrackedList->Put((int)p##theObject, new theObject##Object(p##theObject)); \ } *************** *** 178,182 **** private: ! wxLuaState m_wxlState; // can't declare full class int m_iReference; bool m_bool; --- 178,182 ---- private: ! wxLuaState m_wxlState; int m_iReference; bool m_bool; *************** *** 190,200 **** class wxLuaTreeItemData : public wxTreeItemData { - private: - double m_value; - public: wxLuaTreeItemData(double value = 0) : m_value(value) {} double GetValue() const { return m_value; } void SetValue(double value) { m_value = value; } }; --- 190,200 ---- class wxLuaTreeItemData : public wxTreeItemData { public: wxLuaTreeItemData(double value = 0) : m_value(value) {} double GetValue() const { return m_value; } void SetValue(double value) { m_value = value; } + + private: + double m_value; }; *************** *** 331,337 **** public: wxLuaFunction(WXLUAMETHOD *pMethod, WXLUACLASS *pClass, void *pObject) ! : m_pMethod(pMethod), ! m_pClass(pClass), ! m_pObject(pObject) { } --- 331,335 ---- public: wxLuaFunction(WXLUAMETHOD *pMethod, WXLUACLASS *pClass, void *pObject) ! : m_pMethod(pMethod), m_pClass(pClass), m_pObject(pObject) { } *************** *** 370,374 **** return wxEmptyString; ! return wxConvertMB2WX(luastr); } --- 368,372 ---- return wxEmptyString; ! return wxConvertMB2WX(luastr); // this fails on NULL } *************** *** 384,389 **** { public: ! LuaCharBuffer(const wxString &wxstr) ! : m_buffer((const char *)NULL) { wxCharBuffer charBuffer = wxConvertWX2MB(wxstr.c_str()); --- 382,386 ---- { public: ! LuaCharBuffer(const wxString &wxstr) : m_buffer((const char *)NULL) { wxCharBuffer charBuffer = wxConvertWX2MB(wxstr.c_str()); |
From: John L. <jr...@us...> - 2005-11-28 01:29:27
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17359/wxLua/modules/wxlua/src Modified Files: internal.cpp wxlcallb.cpp wxlstate.cpp Log Message: use wxMemorySize in >2.6 in defsutils.i fix removing callbacks (segfault on exit) Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** internal.cpp 26 Nov 2005 09:42:27 -0000 1.13 --- internal.cpp 28 Nov 2005 01:28:54 -0000 1.14 *************** *** 230,234 **** bool LUACALL tsettagmethod(lua_State *L, int tag, const char *method, lua_CFunction func, void *pClass /* = NULL*/) { ! if (tag != TLUA_NOTAG && tget(L, tag)) { if (pClass != NULL) --- 230,234 ---- bool LUACALL tsettagmethod(lua_State *L, int tag, const char *method, lua_CFunction func, void *pClass /* = NULL*/) { ! if ((tag != TLUA_NOTAG) && tget(L, tag)) { if (pClass != NULL) *************** *** 833,838 **** lua_newtable(L); ! size_t idx; ! for (idx = 0; idx < files.Count(); ++idx) { const wxString &item = files.Item(idx); --- 833,838 ---- lua_newtable(L); ! size_t idx, count = files.Count(); ! for (idx = 0; idx < count; ++idx) { const wxString &item = files.Item(idx); *************** *** 847,852 **** lua_newtable(L); ! size_t idx; ! for (idx = 0; idx < table.Count(); ++idx) { int item = table.Item(idx); --- 847,852 ---- lua_newtable(L); ! size_t idx, count = table.Count(); ! for (idx = 0; idx < count; ++idx) { int item = table.Item(idx); *************** *** 1122,1128 **** const char *cpIndex = "{unknown}"; ! if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (ttag(L, 1) == *pClass->class_tag)) { ! void *pObject = ttouserdata(L, 1); cpIndex = lua_tostring(L, 2); --- 1122,1130 ---- const char *cpIndex = "{unknown}"; ! 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); *************** *** 1184,1191 **** const char *cpIndex = lua_tostring(L, 2); ! if ((pClass != NULL) && ! lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && ! (ttag(L, 1) == *pClass->class_tag)) { WXLUAMETHOD *pMethod = wxlState.getLuaProperty(pClass, cpIndex, true); --- 1186,1192 ---- const char *cpIndex = lua_tostring(L, 2); ! if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && ! (wxlState.ttag(1) == *pClass->class_tag)) { WXLUAMETHOD *pMethod = wxlState.getLuaProperty(pClass, cpIndex, true); *************** *** 1197,1201 **** else { ! void *pObject = ttouserdata(L, 1); bool fCreated = false; --- 1198,1202 ---- else { ! void *pObject = wxlState.ttouserdata(1); bool fCreated = false; *************** *** 1311,1315 **** // Create and connect the callback pCallback = new wxLuaCallback(wxlState, 4, id, (int) eventType, evtHandler); - wxlState.GetLuaStateRefData()->m_pAppHandlerList->Append(pCallback); // FIXME see wxCallb constructor break; --- 1312,1315 ---- *************** *** 1348,1352 **** // Create and connect the callback pCallback = new wxLuaCallback(wxlState, 3, id, (int) eventType, evtHandler); - wxlState.GetLuaStateRefData()->m_pAppHandlerList->Append(pCallback); // FIXME see wxCallb constructor } --- 1348,1351 ---- Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxlstate.cpp 26 Nov 2005 09:42:27 -0000 1.6 --- wxlstate.cpp 28 Nov 2005 01:28:55 -0000 1.7 *************** *** 302,310 **** { wxLuaCallback *pCallback = (wxLuaCallback *) node->GetData(); ! ! if (pCallback) ! { ! pCallback->ClearState(); ! } node = node->GetNext(); --- 302,307 ---- { wxLuaCallback *pCallback = (wxLuaCallback *) node->GetData(); ! wxCHECK_RET(pCallback, wxT("Invalid wxLuaCallback")); ! pCallback->ClearLuaState(); node = node->GetNext(); *************** *** 314,322 **** { wxLuaDestroyCallback *pCallback = (wxLuaDestroyCallback *) node->GetData(); ! ! if (pCallback) ! { ! pCallback->ClearState(); ! } node = node->GetNext(); --- 311,316 ---- { wxLuaDestroyCallback *pCallback = (wxLuaDestroyCallback *) node->GetData(); ! wxCHECK_RET(pCallback, wxT("Invalid wxLuaCallback")); ! pCallback->ClearLuaState(); node = node->GetNext(); *************** *** 721,726 **** { M_WXLSTATEDATA->m_pWindowList->Append(pWindow); ! wxLuaCallback* pCallback = new wxLuaCallback(*this, 3, pWindow->GetId(), wxEVT_DESTROY, pWindow->GetEventHandler()); ! GetLuaStateRefData()->m_pAppHandlerList->Append(pCallback); // FIXME see wxCallb constructor } } --- 715,719 ---- { M_WXLSTATEDATA->m_pWindowList->Append(pWindow); ! new wxLuaCallback(*this, 3, pWindow->GetId(), wxEVT_DESTROY, pWindow->GetEventHandler()); } } Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlcallb.cpp 26 Nov 2005 09:42:27 -0000 1.3 --- wxlcallb.cpp 28 Nov 2005 01:28:55 -0000 1.4 *************** *** 54,61 **** // FIXME - Need to track events attached to an application object ! // labenski - track all of them? useful to run ClearState when window is destroyed //if (pEvtHandler->IsKindOf(CLASSINFO(wxApp))) { ! //m_wxlState.GetLuaStateRefData()->m_pAppHandlerList->Append(this); } } --- 54,61 ---- // FIXME - Need to track events attached to an application object ! // labenski - track all of them? useful to run ClearLuaState when window is destroyed //if (pEvtHandler->IsKindOf(CLASSINFO(wxApp))) { ! m_wxlState.GetLuaStateRefData()->m_pAppHandlerList->Append(this); } } *************** *** 72,90 **** } - void wxLuaCallback::ClearState() - { - if (m_wxlState.Ok()) - { - m_wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(this); - m_wxlState.UnRef(); - } - } - // This function is called with "this" being of the type which the event is arriving // at. The user data is used to route it to the correct place. void wxLuaCallback::EventHandler(wxEvent& event) { wxLuaCallback *theCallback = (wxLuaCallback *) event.m_callbackUserData; if (!theCallback || !theCallback->GetwxLuaState().Ok()) return; --- 72,83 ---- } // This function is called with "this" being of the type which the event is arriving // at. The user data is used to route it to the correct place. void wxLuaCallback::EventHandler(wxEvent& event) { + // This is the wxLuaCallback to use, NOT "this" wxLuaCallback *theCallback = (wxLuaCallback *) event.m_callbackUserData; + wxCHECK_RET(theCallback != NULL, wxT("Invalid wxLuaCallback in user data")); if (!theCallback || !theCallback->GetwxLuaState().Ok()) return; *************** *** 98,105 **** wxlState.GetLuaStateRefData()->m_pWindowList->DeleteObject((wxWindow*)event.GetEventObject()); // delete the reference to this handler since we're clearing it ! m_wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(this); // Disconnect all callbacks associated with this window's evthandler ! theCallback->ClearState(); wxEvtHandler *evtHandler = ((wxWindow*)event.GetEventObject())->GetEventHandler(); --- 91,98 ---- wxlState.GetLuaStateRefData()->m_pWindowList->DeleteObject((wxWindow*)event.GetEventObject()); // delete the reference to this handler since we're clearing it ! wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(this); // Disconnect all callbacks associated with this window's evthandler ! theCallback->ClearLuaState(); wxEvtHandler *evtHandler = ((wxWindow*)event.GetEventObject())->GetEventHandler(); *************** *** 112,121 **** if ((pCallback != NULL) && (pCallback->GetEvtHandler() == evtHandler)) { - // go to new node before we delete it - node = wxlState.GetLuaStateRefData()->m_pAppHandlerList->GetFirst(); // delete the reference to all other handlers that are cleared ! m_wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(pCallback); ! pCallback->ClearState(); } else --- 105,114 ---- if ((pCallback != NULL) && (pCallback->GetEvtHandler() == evtHandler)) { // delete the reference to all other handlers that are cleared ! wxNode* pc_node = node; // remember current node ! node = node->GetNext(); ! wxlState.GetLuaStateRefData()->m_pAppHandlerList->Erase(pc_node); ! pCallback->ClearLuaState(); } else *************** *** 123,127 **** } } ! else //if (theCallback->m_luaState) theCallback->CallFunction(&event); --- 116,120 ---- } } ! else theCallback->CallFunction(&event); *************** *** 186,190 **** // and set the metatable of the proxy ! if (iTag != TLUA_NOTAG && tget(L, iTag)) { if (lua_setmetatable(L, -2) == 0) --- 179,183 ---- // and set the metatable of the proxy ! if ((iTag != TLUA_NOTAG) && m_wxlState.tget(iTag)) { if (lua_setmetatable(L, -2) == 0) *************** *** 195,199 **** // get a reference to the destroy handler table ! if (tget(L, m_wxlState.GetLuaStateRefData()->m_wxDeleteTable)) { // create a reference to object --- 188,192 ---- // get a reference to the destroy handler table ! if (m_wxlState.tget(m_wxlState.GetLuaStateRefData()->m_wxDeleteTable)) { // create a reference to object |
From: John L. <jr...@us...> - 2005-11-28 01:29:26
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17359/wxLua/bindings/wxwidgets Modified Files: defsutil.i Log Message: use wxMemorySize in >2.6 in defsutils.i fix removing callbacks (segfault on exit) Index: defsutil.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/defsutil.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** defsutil.i 24 Nov 2005 06:38:17 -0000 1.6 --- defsutil.i 28 Nov 2005 01:28:54 -0000 1.7 *************** *** 40,44 **** wxProcess(wxEvtHandler *parent = NULL, int nId = wxID_ANY) //wxProcess(int flags) ! //static wxKillError Kill(int pid, wxSignal sig = wxSIGTERM, int flags = wxKILL_NOCHILDREN) static bool Exists(int pid) --- 40,44 ---- wxProcess(wxEvtHandler *parent = NULL, int nId = wxID_ANY) //wxProcess(int flags) ! //static wxKillError Kill(int pid, wxSignal sig = wxSIGTERM, int flags = wxKILL_NOCHILDREN) static bool Exists(int pid) *************** *** 48,52 **** bool IsRedirected() void Detach() ! %if wxUSE_STREAMS wxInputStream *GetInputStream() const --- 48,52 ---- bool IsRedirected() void Detach() ! %if wxUSE_STREAMS wxInputStream *GetInputStream() const *************** *** 59,63 **** void SetPipeStreams(wxInputStream *outStream, wxOutputStream *inStream, wxInputStream *errStream) %endif // wxUSE_STREAMS ! %endclass --- 59,63 ---- void SetPipeStreams(wxInputStream *outStream, wxOutputStream *inStream, wxInputStream *errStream) %endif // wxUSE_STREAMS ! %endclass *************** *** 75,79 **** // Network, user, and OS functions ! %builtin long wxGetFreeMemory() %builtin wxString wxGetFullHostName() //%builtin bool wxGetEmailAddress(const wxString& buf, int sz) --- 75,80 ---- // Network, user, and OS functions ! !%wxchkver27 %builtin long wxGetFreeMemory() ! %wxchkver27 %builtin wxMemorySize wxGetFreeMemory() %builtin wxString wxGetFullHostName() //%builtin bool wxGetEmailAddress(const wxString& buf, int sz) |
From: Francesco M. <fr...@us...> - 2005-11-26 14:25:33
|
Update of /cvsroot/wxlua/wxLua/build/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15664/build/msw Modified Files: wxLua.dsw Log Message: added to mod_lua dependency on mod_lu_lib Index: wxLua.dsw =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/msw/wxLua.dsw,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxLua.dsw 20 Jun 2005 09:48:56 -0000 1.1 --- wxLua.dsw 26 Nov 2005 14:25:24 -0000 1.2 *************** *** 42,45 **** --- 42,48 ---- Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name mod_lua_lib + End Project Dependency }}} |
From: Francesco M. <fr...@us...> - 2005-11-26 14:20:41
|
Update of /cvsroot/wxlua/wxLua/modules/build/bakefiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14904/modules/build/bakefiles Modified Files: options.bkl Log Message: added configure checks for wxLua apps,modules,util options Index: options.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/bakefiles/options.bkl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** options.bkl 25 Nov 2005 17:30:29 -0000 1.4 --- options.bkl 26 Nov 2005 14:20:30 -0000 1.5 *************** *** 15,19 **** <!-- ================================================================== --> ! <!-- module enable/disable option defaults --> <set var="USE_WXLUADEBUGLIB_DEFAULT">1</set> <set var="USE_WXLUASOCKETLIB_DEFAULT">1</set> --- 15,23 ---- <!-- ================================================================== --> ! <!-- module enable/disable option defaults ! NOTE: if you change these defaults, then you should also change the ! defaults for the --enable-* options in configure script: ! see wxLua/build/autoconf/configure.ac ! --> <set var="USE_WXLUADEBUGLIB_DEFAULT">1</set> <set var="USE_WXLUASOCKETLIB_DEFAULT">1</set> |
From: Francesco M. <fr...@us...> - 2005-11-26 14:20:39
|
Update of /cvsroot/wxlua/wxLua/util/build/bakefiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14904/util/build/bakefiles Modified Files: options.bkl Log Message: added configure checks for wxLua apps,modules,util options Index: options.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/util/build/bakefiles/options.bkl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** options.bkl 24 Nov 2005 21:34:16 -0000 1.3 --- options.bkl 26 Nov 2005 14:20:31 -0000 1.4 *************** *** 22,26 **** <!-- ================================================================== --> ! <!-- options not tied to a specific module --> <if cond="TARGETING_IDE=='0'"> --- 22,30 ---- <!-- ================================================================== --> ! <!-- options not tied to a specific module ! NOTE: if you change these defaults, then you should also change the ! defaults for the --enable-* options in configure script: ! see wxLua/build/autoconf/configure.ac ! --> <if cond="TARGETING_IDE=='0'"> |
From: Francesco M. <fr...@us...> - 2005-11-26 14:20:39
|
Update of /cvsroot/wxlua/wxLua In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14904 Modified Files: configure Log Message: added configure checks for wxLua apps,modules,util options Index: configure =================================================================== RCS file: /cvsroot/wxlua/wxLua/configure,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** configure 26 Nov 2005 14:06:05 -0000 1.3 --- configure 26 Nov 2005 14:20:30 -0000 1.4 *************** *** 4500,4507 **** if [ "$WX_DEBUG" = "1" ]; then ! CPPFLAGS="$CPPFLAGS -g -O0 -Wall -Wundef -Wno-ctor-dtor-privacy" CFLAGS="$CFLAGS -g -O0 -Wall -Wundef" else ! CPPFLAGS="$CPPFLAGS -O2" CFLAGS="$CFLAGS -O2" fi --- 4500,4507 ---- if [ "$WX_DEBUG" = "1" ]; then ! CXXFLAGS="$CXXFLAGS -g -O0 -Wall -Wundef -Wno-ctor-dtor-privacy" CFLAGS="$CFLAGS -g -O0 -Wall -Wundef" else ! CXXFLAGS="$CXXFLAGS -O2" CFLAGS="$CFLAGS -O2" fi *************** *** 7596,7599 **** --- 7596,7624 ---- fi + if [ "$USE_WXLUAAPP" = "1" ]; then + echo " - wxLua application ENABLED" + else + echo " - wxLua application DISABLED" + fi + if [ "$USE_WXLUAEDITAPP" = "1" ]; then + echo " - wxLuaEdit application ENABLED" + else + echo " - wxLuaEdit application DISABLED" + fi + if [ "$USE_WXLUADEBUGLIB" = "1" ]; then + echo " - wxLua debug support ENABLED" + else + echo " - wxLua debug support DISABLED" + fi + if [ "$USE_WXLUASOCKETLIB" = "1" ]; then + echo " - wxLua socket support ENABLED" + else + echo " - wxLua socket support DISABLED" + fi + if [ "$USE_BIN2C" = "1" ]; then + echo " - wxLua bin2c utility ENABLED" + else + echo " - wxLua bin2c utility DISABLED" + fi echo |
From: Francesco M. <fr...@us...> - 2005-11-26 14:20:38
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14904/bindings/wxwidgets Modified Files: luasetup.h.in Log Message: added configure checks for wxLua apps,modules,util options Index: luasetup.h.in =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/luasetup.h.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** luasetup.h.in 25 Nov 2005 02:43:01 -0000 1.2 --- luasetup.h.in 26 Nov 2005 14:20:30 -0000 1.3 *************** *** 4,8 **** #define __WXLUA_SETUP__ ! #define wxLUA_USE_FL 1 #define wxLUA_USE_Geometry 1 #define wxLUA_USE_MDI 1 --- 4,8 ---- #define __WXLUA_SETUP__ ! #define wxLUA_USE_FL 0 #define wxLUA_USE_Geometry 1 #define wxLUA_USE_MDI 1 *************** *** 97,101 **** #define wxLUA_USE_wxStatusBar 1 #define wxLUA_USE_wxStringList 1 ! #define wxLUA_USE_wxStyledTextCtrl 1 #define wxLUA_USE_wxSystemSettings 1 #define wxLUA_USE_wxTabCtrl 1 --- 97,101 ---- #define wxLUA_USE_wxStatusBar 1 #define wxLUA_USE_wxStringList 1 ! #define wxLUA_USE_wxStyledTextCtrl 0 #define wxLUA_USE_wxSystemSettings 1 #define wxLUA_USE_wxTabCtrl 1 |
From: Francesco M. <fr...@us...> - 2005-11-26 14:20:38
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14904/build/autoconf Modified Files: configure.ac Log Message: added configure checks for wxLua apps,modules,util options Index: configure.ac =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** configure.ac 26 Nov 2005 14:06:05 -0000 1.3 --- configure.ac 26 Nov 2005 14:20:30 -0000 1.4 *************** *** 82,85 **** --- 82,110 ---- AM_WXPRESETS_MSG_BEGIN + if [[ "$USE_WXLUAAPP" = "1" ]]; then + echo " - wxLua application ENABLED" + else + echo " - wxLua application DISABLED" + fi + if [[ "$USE_WXLUAEDITAPP" = "1" ]]; then + echo " - wxLuaEdit application ENABLED" + else + echo " - wxLuaEdit application DISABLED" + fi + if [[ "$USE_WXLUADEBUGLIB" = "1" ]]; then + echo " - wxLua debug support ENABLED" + else + echo " - wxLua debug support DISABLED" + fi + if [[ "$USE_WXLUASOCKETLIB" = "1" ]]; then + echo " - wxLua socket support ENABLED" + else + echo " - wxLua socket support DISABLED" + fi + if [[ "$USE_BIN2C" = "1" ]]; then + echo " - wxLua bin2c utility ENABLED" + else + echo " - wxLua bin2c utility DISABLED" + fi AM_WXPRESETS_MSG_END |
From: Francesco M. <fr...@us...> - 2005-11-26 14:06:18
|
Update of /cvsroot/wxlua/wxLua/apps/build/bakefiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13105/apps/build/bakefiles Modified Files: apps.bkl options.bkl Log Message: added configure checks for wxLua apps,modules,util options Index: options.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/build/bakefiles/options.bkl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** options.bkl 24 Nov 2005 21:34:16 -0000 1.2 --- options.bkl 26 Nov 2005 14:06:05 -0000 1.3 *************** *** 15,19 **** <!-- ================================================================== --> ! <!-- module enable/disable option defaults --> <set var="USE_WXLUAAPP_DEFAULT">1</set> <set var="USE_WXLUAEDITAPP_DEFAULT">0</set> --- 15,23 ---- <!-- ================================================================== --> ! <!-- module enable/disable option defaults ! NOTE: if you change these defaults, then you should also change the ! defaults for the --enable-* options in configure script: ! see wxLua/build/autoconf/configure.ac ! --> <set var="USE_WXLUAAPP_DEFAULT">1</set> <set var="USE_WXLUAEDITAPP_DEFAULT">0</set> Index: apps.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/build/bakefiles/apps.bkl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** apps.bkl 25 Nov 2005 22:29:07 -0000 1.9 --- apps.bkl 26 Nov 2005 14:06:05 -0000 1.10 *************** *** 102,106 **** <if cond="FORMAT=='autoconf'"> <include>$(DOLLAR)(WXSTEDIT)/include</include> ! </if>*util.bkl <!-- Libraries must be put in the right order ! --> --- 102,106 ---- <if cond="FORMAT=='autoconf'"> <include>$(DOLLAR)(WXSTEDIT)/include</include> ! </if> <!-- Libraries must be put in the right order ! --> |
From: Francesco M. <fr...@us...> - 2005-11-26 14:06:18
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13105/build/autoconf Modified Files: aclocal.m4 acregen.sh configure.ac wxpresets.m4 Log Message: added configure checks for wxLua apps,modules,util options Index: wxpresets.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/wxpresets.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxpresets.m4 20 Nov 2005 11:36:23 -0000 1.1 --- wxpresets.m4 26 Nov 2005 14:06:05 -0000 1.2 *************** *** 16,20 **** dnl dnl # required library checks ! dnl AM_WXPRESETS dnl ... dnl --- 16,20 ---- dnl dnl # required library checks ! dnl AM_WXPRESETS_FULL([2.6.1], [net,xrc,stc]) dnl ... dnl *************** *** 31,34 **** --- 31,56 ---- dnl --------------------------------------------------------------------------- + dnl AM_YESNO_OPTCHECK([name of the boolean variable to set], + dnl [name of the --enable-option variable with yes/no values], + dnl [name of the --enable option]) + dnl + dnl Converts the $3 variable, suppose to contain a yes/no value to a 1/0 + dnl boolean variable and saves the result into $1. + dnl Outputs also the standard checking-option message. + dnl --------------------------------------------------------------------------- + AC_DEFUN([AM_YESNO_OPTCHECK], + [ + AC_MSG_CHECKING([for $3 option]) + if [[ "x$$2" = "xyes" ]]; then + AC_MSG_RESULT([yes]) + $1=1 + else + AC_MSG_RESULT([no]) + $1=0 + fi + ]) + + + dnl --------------------------------------------------------------------------- dnl AM_WXFLAGS_CONTAIN / AM_WXSELECTEDCONFIG_CONTAIN ([RESULTVAR], [STRING]) dnl *************** *** 547,554 **** dnl NOTE: the -Wundef and -Wno-ctor-dtor-privacy are not enabled automatically by -Wall ! CPPFLAGS="$CPPFLAGS -g -O0 -Wall -Wundef -Wno-ctor-dtor-privacy" CFLAGS="$CFLAGS -g -O0 -Wall -Wundef" else ! CPPFLAGS="$CPPFLAGS -O2" CFLAGS="$CFLAGS -O2" fi --- 569,580 ---- dnl NOTE: the -Wundef and -Wno-ctor-dtor-privacy are not enabled automatically by -Wall ! dnl NOTE2: the '-Wno-ctor-dtor-privacy' has sense only when compiling C++ source files ! dnl and thus we must be careful to add it only to CXXFLAGS and not to CFLAGS ! dnl (remember that CPPFLAGS is reserved for both C and C++ compilers while ! dnl CFLAGS is intended as flags for C compiler only and CXXFLAGS for C++ only) ! CXXFLAGS="$CXXFLAGS -g -O0 -Wall -Wundef -Wno-ctor-dtor-privacy" CFLAGS="$CFLAGS -g -O0 -Wall -Wundef" else ! CXXFLAGS="$CXXFLAGS -O2" CFLAGS="$CFLAGS -O2" fi Index: acregen.sh =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/acregen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** acregen.sh 20 Nov 2005 11:35:17 -0000 1.1 --- acregen.sh 26 Nov 2005 14:06:05 -0000 1.2 *************** *** 5,10 **** # Creation date: 14/9/2005 # ! # A simple script to generate the configure script ! ( aclocal && autoconf && mv configure ../.. ) --- 5,47 ---- # Creation date: 14/9/2005 # ! # A simple script to generate the configure script for a wxCode component ! # Some features of this version: ! # - automatic test for aclocal version ! # - able to be called from any folder ! # (i.e. you can call it typing 'build/acregen.sh', not only './acregen.sh') ! # called when an old version of aclocal is found ! function aclocalold() ! { ! echo "Your aclocal version is $aclocal_maj.$aclocal_min.$aclocal_rel" ! echo "Your automake installation is too old; please install automake >= $aclocal_minimal_maj.$aclocal_minimal_min.$aclocal_minimal_rel" ! echo "You can download automake from ftp://sources.redhat.com/pub/automake/" ! exit 1 ! } ! ! # first check if we have an ACLOCAL version recent enough ! aclocal_verfull=$(aclocal --version) ! aclocal_maj=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\1/'` ! aclocal_min=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\2/'` ! aclocal_rel=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\3/'` ! ! aclocal_minimal_maj=1 ! aclocal_minimal_min=9 ! aclocal_minimal_rel=6 ! ! majok=$(expr $aclocal_maj \>= $aclocal_minimal_maj) ! minok=$(expr $aclocal_min \>= $aclocal_minimal_min) ! relok=$(expr $aclocal_rel \>= $aclocal_minimal_rel) ! ! if [[ "$majok" = "0" ]]; then aclocalold; fi ! if [[ "$majok" = "1" && "$minok" = "0" ]]; then aclocalold; fi ! if [[ "$majok" = "1" && "$minok" = "1" && "$relok" = 0 ]]; then aclocalold; fi ! ! # we can safely proceed ! me=$(basename $0) ! path=${0%%/$me} # path from which the script has been launched ! current=$(pwd) ! cd $path ! aclocal && autoconf && mv configure ../.. ! cd $current Index: configure.ac =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configure.ac 20 Nov 2005 12:11:48 -0000 1.2 --- configure.ac 26 Nov 2005 14:06:05 -0000 1.3 *************** *** 18,24 **** --- 18,62 ---- + ## CONFIGURE OPTIONS ##################################################################### + # Options for the APPS section + + AC_ARG_ENABLE([wxlua-app], + [AC_HELP_STRING([--enable-wxlua-app], [Compiles the wxLua app (default is yes)])], + [], [enable_wxlua_app=yes]) + AC_ARG_ENABLE([wxluaedit-app], + [AC_HELP_STRING([--enable-wxluaedit-app], [Compiles the wxLuaEditor app (default is no)])], + [], [enable_wxluaedit_app=no]) + + + # Options for the MODULES section + + AC_ARG_ENABLE([wxluadebuglib], + [AC_HELP_STRING([--enable-wxluadebuglib], [Compiles the wxLua debug support (default is yes)])], + [], [enable_wxluadebuglib=yes]) + AC_ARG_ENABLE([wxluasocketlib], + [AC_HELP_STRING([--enable-wxluasocketlib], [Compiles the wxLua socket support (default is yes)])], + [], [enable_wxluasocketlib=yes]) + + + # Options for the UTIL section + + AC_ARG_ENABLE([bin2c], + [AC_HELP_STRING([--enable-bin2c], [Compiles the bin2c utility (default is yes)])], + [], [enable_bin2c=yes]) + + + AM_YESNO_OPTCHECK([USE_WXLUAAPP], [enable_wxlua_app], [--enable-wxlua-app]) + AM_YESNO_OPTCHECK([USE_WXLUAEDITAPP], [enable_wxluaedit_app], [--enable-wxluaedit-app]) + + AM_YESNO_OPTCHECK([USE_WXLUADEBUGLIB], [enable_wxluadebuglib], [--enable-wxluadebuglib]) + AM_YESNO_OPTCHECK([USE_WXLUASOCKETLIB], [enable_wxluasocketlib], [--enable-wxluasocketlib]) + + AM_YESNO_OPTCHECK([USE_BIN2C], [enable_bin2c], [--enable-bin2c]) + + + AM_OPTIONS_WXCONFIG # don't touch this macro AM_OPTIONS_WXPRESETS # don't touch this macro Index: aclocal.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/aclocal.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** aclocal.m4 20 Nov 2005 11:36:23 -0000 1.1 --- aclocal.m4 26 Nov 2005 14:06:05 -0000 1.2 *************** *** 323,326 **** --- 323,332 ---- *-*-darwin* ) + AC_BAKEFILE_CREATE_FILE_SHARED_LD_SH + chmod +x shared-ld-sh + + SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o" + SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" + dnl Most apps benefit from being fully binded (its faster and static dnl variables initialized at startup work). *************** *** 330,334 **** dnl If using newer dev tools then there is a -single_module flag that ! dnl we can use to do this, otherwise we'll need to use a helper dnl script. Check the version of gcc to see which way we can go: AC_CACHE_CHECK([for gcc 3.1 or later], bakefile_cv_gcc31, [ --- 336,340 ---- dnl If using newer dev tools then there is a -single_module flag that ! dnl we can use to do this for dylibs, otherwise we'll need to use a helper dnl script. Check the version of gcc to see which way we can go: AC_CACHE_CHECK([for gcc 3.1 or later], bakefile_cv_gcc31, [ *************** *** 349,366 **** ]) if test "$bakefile_cv_gcc31" = "no"; then - AC_BAKEFILE_CREATE_FILE_SHARED_LD_SH - chmod +x shared-ld-sh - dnl Use the shared-ld-sh helper script SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -headerpad_max_install_names -o" - SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o" SHARED_LD_CXX="$SHARED_LD_CC" - SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" else dnl Use the -single_module flag and let the linker do it for us SHARED_LD_CC="\${CC} -dynamiclib -single_module -headerpad_max_install_names -o" - SHARED_LD_MODULE_CC="\${CC} -bundle -single_module -headerpad_max_install_names -o" SHARED_LD_CXX="\${CXX} -dynamiclib -single_module -headerpad_max_install_names -o" - SHARED_LD_MODULE_CXX="\${CXX} -bundle -single_module -headerpad_max_install_names -o" fi --- 355,365 ---- *************** *** 375,401 **** *-*-aix* ) if test "x$GCC" = "xyes"; then ! dnl at least gcc 2.95 warns that -fPIC is ignored when ! dnl compiling each and every file under AIX which is annoying, ! dnl so don't use it there (it's useless as AIX runs on ! dnl position-independent architectures only anyhow) ! PIC_FLAG="" ! dnl -bexpfull is needed by AIX linker to export all symbols (by ! dnl default it doesn't export any and even with -bexpall it ! dnl doesn't export all C++ support symbols, e.g. vtable ! dnl pointers) but it's only available starting from 5.1 (with ! dnl maintenance pack 2, whatever this is), see ! dnl http://www-128.ibm.com/developerworks/eserver/articles/gnu.html ! case "${BAKEFILE_HOST}" in ! *-*-aix5* ) ! LD_EXPFULL="-Wl,-bexpfull" ! ;; ! esac ! SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o" ! SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o" ! else ! dnl FIXME: makeC++SharedLib is obsolete, what should we do for ! dnl recent AIX versions? AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib, makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib) --- 374,400 ---- *-*-aix* ) if test "x$GCC" = "xyes"; then ! dnl at least gcc 2.95 warns that -fPIC is ignored when ! dnl compiling each and every file under AIX which is annoying, ! dnl so don't use it there (it's useless as AIX runs on ! dnl position-independent architectures only anyhow) ! PIC_FLAG="" ! dnl -bexpfull is needed by AIX linker to export all symbols (by ! dnl default it doesn't export any and even with -bexpall it ! dnl doesn't export all C++ support symbols, e.g. vtable ! dnl pointers) but it's only available starting from 5.1 (with ! dnl maintenance pack 2, whatever this is), see ! dnl http://www-128.ibm.com/developerworks/eserver/articles/gnu.html ! case "${BAKEFILE_HOST}" in ! *-*-aix5* ) ! LD_EXPFULL="-Wl,-bexpfull" ! ;; ! esac ! SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o" ! SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o" ! else ! dnl FIXME: makeC++SharedLib is obsolete, what should we do for ! dnl recent AIX versions? AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib, makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib) *************** *** 418,422 **** fi ;; ! *-*-cygwin* | *-*-mingw32* ) PIC_FLAG="" --- 417,421 ---- fi ;; ! *-*-cygwin* | *-*-mingw32* ) PIC_FLAG="" *************** *** 433,437 **** chmod +x dllar.sh ;; ! powerpc-apple-macos* | \ *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \ --- 432,436 ---- chmod +x dllar.sh ;; ! powerpc-apple-macos* | \ *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \ *************** *** 626,649 **** AC_DEFUN([AC_BAKEFILE_RES_COMPILERS], [ - RESCOMP= - SETFILE= - case ${BAKEFILE_HOST} in *-*-cygwin* | *-*-mingw32* ) dnl Check for win32 resources compiler: ! if test "$build" != "$host" ; then ! RESCOMP=$host_alias-windres ! else ! AC_CHECK_PROG(RESCOMP, windres, windres, windres) ! fi ;; *-*-darwin* | powerpc-apple-macos* ) ! AC_CHECK_PROG(RESCOMP, Rez, Rez, /Developer/Tools/Rez) AC_CHECK_PROG(SETFILE, SetFile, SetFile, /Developer/Tools/SetFile) ;; esac ! AC_SUBST(RESCOMP) AC_SUBST(SETFILE) ]) --- 625,642 ---- AC_DEFUN([AC_BAKEFILE_RES_COMPILERS], [ case ${BAKEFILE_HOST} in *-*-cygwin* | *-*-mingw32* ) dnl Check for win32 resources compiler: ! AC_CHECK_TOOL(WINDRES, windres) ;; *-*-darwin* | powerpc-apple-macos* ) ! AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez) AC_CHECK_PROG(SETFILE, SetFile, SetFile, /Developer/Tools/SetFile) ;; esac ! AC_SUBST(WINDRES) ! AC_SUBST(REZ) AC_SUBST(SETFILE) ]) *************** *** 665,668 **** --- 658,670 ---- GCC_PCH=0 + case ${BAKEFILE_HOST} in + *-*-cygwin* ) + dnl PCH support is broken in cygwin gcc because of unportable + dnl assumptions about mmap() in gcc code which make PCH generation + dnl fail erratically; disable PCH completely until this is fixed + bk_use_pch="no" + ;; + esac + if test "x$bk_use_pch" = "x" -o "x$bk_use_pch" = "xyes" ; then if test "x$GCC" = "xyes"; then |
From: Francesco M. <fr...@us...> - 2005-11-26 14:06:15
|
Update of /cvsroot/wxlua/wxLua In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13105 Modified Files: configure Log Message: added configure checks for wxLua apps,modules,util options Index: configure =================================================================== RCS file: /cvsroot/wxlua/wxLua/configure,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configure 20 Nov 2005 12:11:48 -0000 1.2 --- configure 26 Nov 2005 14:06:05 -0000 1.3 *************** *** 274,278 **** PACKAGE_BUGREPORT='fr...@us...' ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CXXCPP WX_CONFIG_PATH WX_CPPFLAGS WX_CFLAGS WX_CXXFLAGS WX_CFLAGS_ONLY WX_CXXFLAGS_ONLY WX_LIBS WX_LIBS_STATIC WX_VERSION SET_MAKE MAKE_SET AR ac_ct_AR STRIP ac_ct_STRIP NM ac_ct_NM INSTALL_DIR LDFLAGS_GUI IF_GNU_MAKE PLATFORM_UNIX PLATFORM_WIN32 PLATFORM_MSDOS PLATFORM_MAC PLATFORM_MACOS PLATFORM_MACOSX PLATFORM_OS2 PLATFORM_BEOS SO_SUFFIX SO_SUFFIX_MODULE DLLIMP_SUFFIX LIBPREFIX LIBEXT DLLPREFIX DLLPREFIX_MODULE dlldir AIX_CXX_LD SHARED_LD_CC SHARED_LD_CXX SHARED_LD_MODULE_CC SHARED_LD_MODULE_CXX PIC_FLAG WINDOWS_IMPLIB USE_SOVERSION USE_SOVERLINUX USE_SOVERSOLARIS USE_SOVERCYGWIN USE_MACVERSION USE_SOSYMLINKS SONAME_FLAG DEPS_TRACKING RESCOMP SETFILE COND_DEPS_TRACKING_0 COND_DEPS_TRACKING_1 COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1 COND_PLATFORM_MACOSX_0_USE_SOVERSION_1 COND_PLATFORM_MACOSX_1 COND_PLATFORM_MACOSX_1_USE_SOVERSION_1 COND_PLATFORM_MAC_1 COND_PLATFORM_OS2_1 COND_PLATFORM_WIN32_1 COND_USE_APPS_1 COND_USE_BIN2C_1 COND_USE_SOSYMLINKS_1 COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1 COND_USE_SOVERLINUX_1 COND_USE_SOVERSION_0 COND_USE_SOVERSOLARIS_1 COND_USE_UTIL_1 COND_WINDOWS_IMPLIB_1 COND_WX_SHARED_0 COND_WX_SHARED_1 LIBOBJS LTLIBOBJS' ac_subst_files='' --- 274,278 ---- PACKAGE_BUGREPORT='fr...@us...' ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CXXCPP WX_CONFIG_PATH WX_CPPFLAGS WX_CFLAGS WX_CXXFLAGS WX_CFLAGS_ONLY WX_CXXFLAGS_ONLY WX_LIBS WX_LIBS_STATIC WX_VERSION SET_MAKE MAKE_SET AR ac_ct_AR STRIP ac_ct_STRIP NM ac_ct_NM INSTALL_DIR LDFLAGS_GUI IF_GNU_MAKE PLATFORM_UNIX PLATFORM_WIN32 PLATFORM_MSDOS PLATFORM_MAC PLATFORM_MACOS PLATFORM_MACOSX PLATFORM_OS2 PLATFORM_BEOS SO_SUFFIX SO_SUFFIX_MODULE DLLIMP_SUFFIX LIBPREFIX LIBEXT DLLPREFIX DLLPREFIX_MODULE dlldir AIX_CXX_LD SHARED_LD_CC SHARED_LD_CXX SHARED_LD_MODULE_CC SHARED_LD_MODULE_CXX PIC_FLAG WINDOWS_IMPLIB USE_SOVERSION USE_SOVERLINUX USE_SOVERSOLARIS USE_SOVERCYGWIN USE_MACVERSION USE_SOSYMLINKS SONAME_FLAG DEPS_TRACKING WINDRES ac_ct_WINDRES REZ SETFILE COND_DEPS_TRACKING_0 COND_DEPS_TRACKING_1 COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1 COND_PLATFORM_MACOSX_0_USE_SOVERSION_1 COND_PLATFORM_MACOSX_1 COND_PLATFORM_MACOSX_1_USE_SOVERSION_1 COND_PLATFORM_MAC_1 COND_PLATFORM_OS2_1 COND_PLATFORM_WIN32_1 COND_USE_APPS_1 COND_USE_BIN2C_1 COND_USE_SOSYMLINKS_1 COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1 COND_USE_SOVERLINUX_1 COND_USE_SOVERSION_0 COND_USE_SOVERSOLARIS_1 COND_USE_UTIL_1 COND_USE_WXLUAAPP_1 COND_USE_WXLUAEDITAPP_1 COND_WINDOWS_IMPLIB_1 COND_WX_SHARED_0 COND_WX_SHARED_1 LIBOBJS LTLIBOBJS' ac_subst_files='' *************** *** 820,823 **** --- 820,828 ---- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-wxlua-app Compiles the wxLua app (default is yes) + --enable-wxluaedit-app Compiles the wxLuaEditor app (default is no) + --enable-wxluadebuglib Compiles the wxLua debug support (default is yes) + --enable-wxluasocketlib Compiles the wxLua socket support (default is yes) + --enable-bin2c Compiles the bin2c utility (default is yes) --enable-static Builds in static mode (default is wxlike) --enable-unicode Builds in unicode mode (default is wxlike) *************** *** 1354,1357 **** --- 1359,1365 ---- + + + ac_aux_dir= for ac_dir in build/autoconf $srcdir/build/autoconf; do *************** *** 1389,1395 **** --- 1397,1521 ---- + ## CONFIGURE OPTIONS ##################################################################### + # Options for the APPS section + + # Check whether --enable-wxlua-app or --disable-wxlua-app was given. + if test "${enable_wxlua_app+set}" = set; then + enableval="$enable_wxlua_app" + + else + enable_wxlua_app=yes + fi; + # Check whether --enable-wxluaedit-app or --disable-wxluaedit-app was given. + if test "${enable_wxluaedit_app+set}" = set; then + enableval="$enable_wxluaedit_app" + + else + enable_wxluaedit_app=no + fi; + + + # Options for the MODULES section + + # Check whether --enable-wxluadebuglib or --disable-wxluadebuglib was given. + if test "${enable_wxluadebuglib+set}" = set; then + enableval="$enable_wxluadebuglib" + + else + enable_wxluadebuglib=yes + fi; + # Check whether --enable-wxluasocketlib or --disable-wxluasocketlib was given. + if test "${enable_wxluasocketlib+set}" = set; then + enableval="$enable_wxluasocketlib" + + else + enable_wxluasocketlib=yes + fi; + + + # Options for the UTIL section + + # Check whether --enable-bin2c or --disable-bin2c was given. + if test "${enable_bin2c+set}" = set; then + enableval="$enable_bin2c" + + else + enable_bin2c=yes + fi; + + + + echo "$as_me:$LINENO: checking for --enable-wxlua-app option" >&5 + echo $ECHO_N "checking for --enable-wxlua-app option... $ECHO_C" >&6 + if [ "x$enable_wxlua_app" = "xyes" ]; then + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + USE_WXLUAAPP=1 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + USE_WXLUAAPP=0 + fi + + + echo "$as_me:$LINENO: checking for --enable-wxluaedit-app option" >&5 + echo $ECHO_N "checking for --enable-wxluaedit-app option... $ECHO_C" >&6 + if [ "x$enable_wxluaedit_app" = "xyes" ]; then + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + USE_WXLUAEDITAPP=1 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + USE_WXLUAEDITAPP=0 + fi + + + + echo "$as_me:$LINENO: checking for --enable-wxluadebuglib option" >&5 + echo $ECHO_N "checking for --enable-wxluadebuglib option... $ECHO_C" >&6 + if [ "x$enable_wxluadebuglib" = "xyes" ]; then + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + USE_WXLUADEBUGLIB=1 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + USE_WXLUADEBUGLIB=0 + fi + + + echo "$as_me:$LINENO: checking for --enable-wxluasocketlib option" >&5 + echo $ECHO_N "checking for --enable-wxluasocketlib option... $ECHO_C" >&6 + if [ "x$enable_wxluasocketlib" = "xyes" ]; then + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + USE_WXLUASOCKETLIB=1 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + USE_WXLUASOCKETLIB=0 + fi + + + + echo "$as_me:$LINENO: checking for --enable-bin2c option" >&5 + echo $ECHO_N "checking for --enable-bin2c option... $ECHO_C" >&6 + if [ "x$enable_bin2c" = "xyes" ]; then + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + USE_BIN2C=1 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + USE_BIN2C=0 + fi + + + + *************** *** 5164,5234 **** *-*-darwin* ) - echo "$as_me:$LINENO: checking for gcc 3.1 or later" >&5 - echo $ECHO_N "checking for gcc 3.1 or later... $ECHO_C" >&6 - if test "${bakefile_cv_gcc31+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - int - main () - { - - #if (__GNUC__ < 3) || \ - ((__GNUC__ == 3) && (__GNUC_MINOR__ < 1)) - #error old gcc - #endif - - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - bakefile_cv_gcc31=yes - - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - - bakefile_cv_gcc31=no - - - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - fi - echo "$as_me:$LINENO: result: $bakefile_cv_gcc31" >&5 - echo "${ECHO_T}$bakefile_cv_gcc31" >&6 - if test "$bakefile_cv_gcc31" = "no"; then - D='$' cat <<EOF >shared-ld-sh --- 5290,5293 ---- *************** *** 5325,5339 **** EOF ! chmod +x shared-ld-sh SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -headerpad_max_install_names -o" - SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o" SHARED_LD_CXX="$SHARED_LD_CC" - SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" else SHARED_LD_CC="\${CC} -dynamiclib -single_module -headerpad_max_install_names -o" - SHARED_LD_MODULE_CC="\${CC} -bundle -single_module -headerpad_max_install_names -o" SHARED_LD_CXX="\${CXX} -dynamiclib -single_module -headerpad_max_install_names -o" - SHARED_LD_MODULE_CXX="\${CXX} -bundle -single_module -headerpad_max_install_names -o" fi --- 5384,5464 ---- EOF ! chmod +x shared-ld-sh ! ! SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o" ! SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" ! ! ! echo "$as_me:$LINENO: checking for gcc 3.1 or later" >&5 ! echo $ECHO_N "checking for gcc 3.1 or later... $ECHO_C" >&6 ! if test "${bakefile_cv_gcc31+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! ! int ! main () ! { ! ! #if (__GNUC__ < 3) || \ ! ((__GNUC__ == 3) && (__GNUC_MINOR__ < 1)) ! #error old gcc ! #endif + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + bakefile_cv_gcc31=yes + + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + bakefile_cv_gcc31=no + + + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + fi + echo "$as_me:$LINENO: result: $bakefile_cv_gcc31" >&5 + echo "${ECHO_T}$bakefile_cv_gcc31" >&6 + if test "$bakefile_cv_gcc31" = "no"; then SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -headerpad_max_install_names -o" SHARED_LD_CXX="$SHARED_LD_CC" else SHARED_LD_CC="\${CC} -dynamiclib -single_module -headerpad_max_install_names -o" SHARED_LD_CXX="\${CXX} -dynamiclib -single_module -headerpad_max_install_names -o" fi *************** *** 5348,5363 **** *-*-aix* ) if test "x$GCC" = "xyes"; then ! PIC_FLAG="" ! case "${BAKEFILE_HOST}" in ! *-*-aix5* ) ! LD_EXPFULL="-Wl,-bexpfull" ! ;; ! esac ! SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o" ! SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o" ! else ! # Extract the first word of "makeC++SharedLib", so it can be a program name with args. set dummy makeC++SharedLib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 --- 5473,5488 ---- *-*-aix* ) if test "x$GCC" = "xyes"; then ! PIC_FLAG="" ! case "${BAKEFILE_HOST}" in ! *-*-aix5* ) ! LD_EXPFULL="-Wl,-bexpfull" ! ;; ! esac ! SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o" ! SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o" ! else ! # Extract the first word of "makeC++SharedLib", so it can be a program name with args. set dummy makeC++SharedLib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 *************** *** 6139,6159 **** - RESCOMP= - SETFILE= - case ${BAKEFILE_HOST} in *-*-cygwin* | *-*-mingw32* ) ! if test "$build" != "$host" ; then ! RESCOMP=$host_alias-windres ! else ! # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_RESCOMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$RESCOMP"; then ! ac_cv_prog_RESCOMP="$RESCOMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --- 6264,6317 ---- case ${BAKEFILE_HOST} in *-*-cygwin* | *-*-mingw32* ) ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. ! set dummy ${ac_tool_prefix}windres; ac_word=$2 ! echo "$as_me:$LINENO: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_WINDRES+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$WINDRES"; then ! ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. ! else ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_WINDRES="${ac_tool_prefix}windres" ! echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ! break 2 ! fi ! done ! done ! ! fi ! fi ! WINDRES=$ac_cv_prog_WINDRES ! if test -n "$WINDRES"; then ! echo "$as_me:$LINENO: result: $WINDRES" >&5 ! echo "${ECHO_T}$WINDRES" >&6 ! else ! echo "$as_me:$LINENO: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! fi ! if test -z "$ac_cv_prog_WINDRES"; then ! ac_ct_WINDRES=$WINDRES ! # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$ac_ct_WINDRES"; then ! ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR *************** *** 6164,6168 **** for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_RESCOMP="windres" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 --- 6322,6326 ---- for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_ac_ct_WINDRES="windres" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 *************** *** 6171,6181 **** done - test -z "$ac_cv_prog_RESCOMP" && ac_cv_prog_RESCOMP="windres" fi fi ! RESCOMP=$ac_cv_prog_RESCOMP ! if test -n "$RESCOMP"; then ! echo "$as_me:$LINENO: result: $RESCOMP" >&5 ! echo "${ECHO_T}$RESCOMP" >&6 else echo "$as_me:$LINENO: result: no" >&5 --- 6329,6338 ---- done fi fi ! ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES ! if test -n "$ac_ct_WINDRES"; then ! echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5 ! echo "${ECHO_T}$ac_ct_WINDRES" >&6 else echo "$as_me:$LINENO: result: no" >&5 *************** *** 6183,6187 **** fi ! fi ;; --- 6340,6348 ---- fi ! WINDRES=$ac_ct_WINDRES ! else ! WINDRES="$ac_cv_prog_WINDRES" ! fi ! ;; *************** *** 6191,6199 **** echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_RESCOMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$RESCOMP"; then ! ac_cv_prog_RESCOMP="$RESCOMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --- 6352,6360 ---- echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_REZ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ! if test -n "$REZ"; then ! ac_cv_prog_REZ="$REZ" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR *************** *** 6204,6208 **** for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_RESCOMP="Rez" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 --- 6365,6369 ---- for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ! ac_cv_prog_REZ="Rez" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 *************** *** 6211,6221 **** done ! test -z "$ac_cv_prog_RESCOMP" && ac_cv_prog_RESCOMP="/Developer/Tools/Rez" fi fi ! RESCOMP=$ac_cv_prog_RESCOMP ! if test -n "$RESCOMP"; then ! echo "$as_me:$LINENO: result: $RESCOMP" >&5 ! echo "${ECHO_T}$RESCOMP" >&6 else echo "$as_me:$LINENO: result: no" >&5 --- 6372,6382 ---- done ! test -z "$ac_cv_prog_REZ" && ac_cv_prog_REZ="/Developer/Tools/Rez" fi fi ! REZ=$ac_cv_prog_REZ ! if test -n "$REZ"; then ! echo "$as_me:$LINENO: result: $REZ" >&5 ! echo "${ECHO_T}$REZ" >&6 else echo "$as_me:$LINENO: result: no" >&5 *************** *** 6266,6269 **** --- 6427,6431 ---- + BAKEFILE_BAKEFILE_M4_VERSION="0.1.9" *************** *** 6356,6359 **** --- 6518,6531 ---- fi + COND_USE_WXLUAAPP_1="#" + if test "x$USE_WXLUAAPP" = "x1" ; then + COND_USE_WXLUAAPP_1="" + fi + + COND_USE_WXLUAEDITAPP_1="#" + if test "x$USE_WXLUAEDITAPP" = "x1" ; then + COND_USE_WXLUAEDITAPP_1="" + fi + COND_WINDOWS_IMPLIB_1="#" if test "x$WINDOWS_IMPLIB" = "x1" ; then *************** *** 7106,7110 **** s,@SONAME_FLAG@,$SONAME_FLAG,;t t s,@DEPS_TRACKING@,$DEPS_TRACKING,;t t ! s,@RESCOMP@,$RESCOMP,;t t s,@SETFILE@,$SETFILE,;t t s,@COND_DEPS_TRACKING_0@,$COND_DEPS_TRACKING_0,;t t --- 7278,7284 ---- s,@SONAME_FLAG@,$SONAME_FLAG,;t t s,@DEPS_TRACKING@,$DEPS_TRACKING,;t t ! s,@WINDRES@,$WINDRES,;t t ! s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t ! s,@REZ@,$REZ,;t t s,@SETFILE@,$SETFILE,;t t s,@COND_DEPS_TRACKING_0@,$COND_DEPS_TRACKING_0,;t t *************** *** 7125,7128 **** --- 7299,7304 ---- s,@COND_USE_SOVERSOLARIS_1@,$COND_USE_SOVERSOLARIS_1,;t t s,@COND_USE_UTIL_1@,$COND_USE_UTIL_1,;t t + s,@COND_USE_WXLUAAPP_1@,$COND_USE_WXLUAAPP_1,;t t + s,@COND_USE_WXLUAEDITAPP_1@,$COND_USE_WXLUAEDITAPP_1,;t t s,@COND_WINDOWS_IMPLIB_1@,$COND_WINDOWS_IMPLIB_1,;t t s,@COND_WX_SHARED_0@,$COND_WX_SHARED_0,;t t |
From: John L. <jr...@us...> - 2005-11-26 09:42:35
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1814/wxLua/modules/wxlua/src Modified Files: internal.cpp wxlcallb.cpp wxlstate.cpp Log Message: make it compile in MSVS6 Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** internal.cpp 26 Nov 2005 08:46:57 -0000 1.12 --- internal.cpp 26 Nov 2005 09:42:27 -0000 1.13 *************** *** 659,663 **** wxLuaState wxlState(L); wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); ! return wxlState.addToTrackedMemoryList(pObject); } --- 659,663 ---- wxLuaState wxlState(L); wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); ! wxlState.addToTrackedMemoryList(pObject); } *************** *** 682,686 **** wxLuaState wxlState(L); wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); ! return wxlState.addToTrackedWindowList(pWindow); } --- 682,686 ---- wxLuaState wxlState(L); wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); ! wxlState.addToTrackedWindowList(pWindow); } *************** *** 701,705 **** wxLuaState wxlState(L); wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); ! return wxlState.pushuserdatatype(iTag, data); } else --- 701,705 ---- wxLuaState wxlState(L); wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); ! wxlState.pushuserdatatype(iTag, data); } else *************** *** 1311,1314 **** --- 1311,1316 ---- // Create and connect the callback pCallback = new wxLuaCallback(wxlState, 4, id, (int) eventType, evtHandler); + wxlState.GetLuaStateRefData()->m_pAppHandlerList->Append(pCallback); // FIXME see wxCallb constructor + break; } *************** *** 1346,1349 **** --- 1348,1352 ---- // Create and connect the callback pCallback = new wxLuaCallback(wxlState, 3, id, (int) eventType, evtHandler); + wxlState.GetLuaStateRefData()->m_pAppHandlerList->Append(pCallback); // FIXME see wxCallb constructor } Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxlstate.cpp 26 Nov 2005 08:46:57 -0000 1.5 --- wxlstate.cpp 26 Nov 2005 09:42:27 -0000 1.6 *************** *** 199,202 **** --- 199,212 ---- m_pWindowList = new wxList; + m_pDerivedList->DeleteContents(true); + m_pTrackedList->DeleteContents(true); + + // don't "own" pointers to wxLuaCallbacks, let wxEventHandler do it + m_pAppHandlerList->DeleteContents(false); + // don't delete wxLuaDestroyCallbacks, let wxEventHandler do it + m_pDestroyHandlerList->DeleteContents(false); + // don't delete wxWindow derived classes, let wxWidgets do it + m_pWindowList->DeleteContents(false); + // always add wxWidgets binding m_bindings.Append(new wx_Binding()); *************** *** 259,270 **** } - CleanupWxLua(!m_lua_State_static); s_wxHashMapLuaStateRefData.erase(m_lua_State); ! ! m_pDerivedList->DeleteContents(false); ! m_pTrackedList->DeleteContents(false); ! m_pWindowList->DeleteContents(false); ! ! m_lua_State = NULL; return true; --- 269,274 ---- } s_wxHashMapLuaStateRefData.erase(m_lua_State); ! CleanupWxLua(!m_lua_State_static); return true; *************** *** 277,283 **** //lua_setgcthreshold(L, luaL_optint(L, 1, 0)); // = luaB_collectgarbage(L); - m_pDerivedList->DeleteContents(true); - m_pTrackedList->DeleteContents(true); - ClearCallbacks(); --- 281,284 ---- *************** *** 286,299 **** UnRegisterBindings(); lua_close(m_lua_State); } - // don't "own" pointers to wxLuaCallbacks, let wxEventHandler do it - m_pAppHandlerList->DeleteContents(false); m_pAppHandlerList->Clear(); - // don't delete wxLuaDestroyCallbacks, let wxEventHandler do it - m_pDestroyHandlerList->DeleteContents(false); m_pDestroyHandlerList->Clear(); - // don't delete wxWindow derived classes, let wxWidgets do it - m_pWindowList->DeleteContents(false); m_pWindowList->Clear(); } --- 287,295 ---- UnRegisterBindings(); lua_close(m_lua_State); + m_lua_State = NULL; } m_pAppHandlerList->Clear(); m_pDestroyHandlerList->Clear(); m_pWindowList->Clear(); } *************** *** 327,335 **** } - // don't "own" pointers to wxLuaCallbacks, let wxEventHandler do it - m_pAppHandlerList->DeleteContents(false); m_pAppHandlerList->Clear(); - // don't delete wxLuaDestroyCallbacks, let wxEventHandler do it - m_pDestroyHandlerList->DeleteContents(false); m_pDestroyHandlerList->Clear(); } --- 323,327 ---- *************** *** 729,733 **** { M_WXLSTATEDATA->m_pWindowList->Append(pWindow); ! new wxLuaCallback(*this, 3, pWindow->GetId(), wxEVT_DESTROY, pWindow->GetEventHandler()); } } --- 721,726 ---- { M_WXLSTATEDATA->m_pWindowList->Append(pWindow); ! wxLuaCallback* pCallback = new wxLuaCallback(*this, 3, pWindow->GetId(), wxEVT_DESTROY, pWindow->GetEventHandler()); ! GetLuaStateRefData()->m_pAppHandlerList->Append(pCallback); // FIXME see wxCallb constructor } } Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxlcallb.cpp 26 Nov 2005 08:46:57 -0000 1.2 --- wxlcallb.cpp 26 Nov 2005 09:42:27 -0000 1.3 *************** *** 57,61 **** //if (pEvtHandler->IsKindOf(CLASSINFO(wxApp))) { ! m_wxlState.GetLuaStateRefData()->m_pAppHandlerList->Append(this); } } --- 57,61 ---- //if (pEvtHandler->IsKindOf(CLASSINFO(wxApp))) { ! //m_wxlState.GetLuaStateRefData()->m_pAppHandlerList->Append(this); } } *************** *** 113,117 **** { // go to new node before we delete it ! node = node->GetNext(); // delete the reference to all other handlers that are cleared m_wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(pCallback); --- 113,117 ---- { // go to new node before we delete it ! node = wxlState.GetLuaStateRefData()->m_pAppHandlerList->GetFirst(); // delete the reference to all other handlers that are cleared m_wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(pCallback); |