Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13186/wxLua/modules/wxbind/src Modified Files: wxadv_bind.cpp wxaui_aui.cpp wxaui_bind.cpp wxbase_bind.cpp wxbase_data.cpp wxcore_bind.cpp wxcore_controls.cpp wxcore_event.cpp wxcore_gdi.cpp wxcore_image.cpp wxcore_wxlprint.cpp wxgl_bind.cpp wxhtml_bind.cpp wxhtml_html.cpp wxhtml_wxlhtmlwin.cpp wxmedia_bind.cpp wxnet_bind.cpp wxrichtext_bind.cpp wxstc_bind.cpp wxstc_stc.cpp wxxml_bind.cpp wxxrc_bind.cpp Log Message: Streamlined wxLuaBinding::RegisterBinding(...) and remove the bool "registerClasses" since it didn't do anything useful anyway. If there needs to be a way to reregister the wxLua functions it should to be implemented from the ground up. Renamed the functions wxlua_txxx to wxluaT_xxx to make it easier to search for their usage. The functions in the wxLuaState used to be called just "txxx" and are now called wxluaT_Xxx where the first letter or each word is capitalized (camel-case); again for searching. * This is the beginning of the separation between the "wxLuaReferences" being used for both the "tags" for identifying classes and for just having references to objects so Lua won't GC them. Index: wxstc_stc.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxstc_stc.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxstc_stc.cpp 1 Aug 2007 19:15:37 -0000 1.3 --- wxstc_stc.cpp 17 Nov 2007 00:15:00 -0000 1.4 *************** *** 35,39 **** wxLuaState wxlState(L); // void docPointer ! void * docPointer = (void *)wxlState.ttouserdata(2); // get this wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); --- 35,39 ---- wxLuaState wxlState(L); // void docPointer ! void * docPointer = (void *)wxlState.wxlua_ToUserdata(2); // get this wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); *************** *** 4861,4865 **** wxLuaState wxlState(L); // void docPointer ! void * docPointer = (void *)wxlState.ttouserdata(2); // get this wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); --- 4861,4865 ---- wxLuaState wxlState(L); // void docPointer ! void * docPointer = (void *)wxlState.wxlua_ToUserdata(2); // get this wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); *************** *** 5388,5392 **** wxLuaState wxlState(L); // void docPointer ! void * docPointer = (void *)wxlState.ttouserdata(2); // get this wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); --- 5388,5392 ---- wxLuaState wxlState(L); // void docPointer ! void * docPointer = (void *)wxlState.wxlua_ToUserdata(2); // get this wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); Index: wxhtml_html.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxhtml_html.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxhtml_html.cpp 1 Aug 2007 19:15:36 -0000 1.3 --- wxhtml_html.cpp 17 Nov 2007 00:14:59 -0000 1.4 *************** *** 166,170 **** default: ! wxlState.terror("wxLua: Expected simple type for parameter 3."); break; } --- 166,170 ---- default: ! wxlState.wxlua_Error("wxLua: Expected simple type for parameter 3."); break; } Index: wxcore_event.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_event.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxcore_event.cpp 1 Aug 2007 19:15:35 -0000 1.3 --- wxcore_event.cpp 17 Nov 2007 00:14:58 -0000 1.4 *************** *** 95,99 **** else { ! wxlState.terror(wxString::Format(wxT("wxLua: Connect: Invalid lastId, expected a number for parameter 2, got '%s'."), wxlState.lua_TypeNameIndex(3).c_str())); return 0; --- 95,99 ---- else { ! wxlState.wxlua_Error(wxString::Format(wxT("wxLua: Connect: Invalid lastId, expected a number for parameter 2, got '%s'."), wxlState.lua_TypeNameIndex(3).c_str())); return 0; *************** *** 104,108 **** else { ! wxlState.terror(wxString::Format(wxT("wxLua: Connect: Invalid winId, expected a number for parameter 1, got '%s'."), wxlState.lua_TypeNameIndex(2).c_str())); return 0; --- 104,108 ---- else { ! wxlState.wxlua_Error(wxString::Format(wxT("wxLua: Connect: Invalid winId, expected a number for parameter 1, got '%s'."), wxlState.lua_TypeNameIndex(2).c_str())); return 0; *************** *** 120,124 **** else { ! wxlState.terror(wxString::Format(wxT("wxLua: Connect: Invalid id, expected a number for parameter 1, got '%s'."), wxlState.lua_TypeNameIndex(2).c_str())); return 0; --- 120,124 ---- else { ! wxlState.wxlua_Error(wxString::Format(wxT("wxLua: Connect: Invalid id, expected a number for parameter 1, got '%s'."), wxlState.lua_TypeNameIndex(2).c_str())); return 0; *************** *** 143,147 **** else { ! wxlState.terror("wxLua: Connect: Unexpected event object type, expected a wxWindow."); return 0; } --- 143,147 ---- else { ! wxlState.wxlua_Error("wxLua: Connect: Unexpected event object type, expected a wxWindow."); return 0; } *************** *** 151,155 **** default: { ! wxlState.terror("wxLua: wxEvtHandler Connect: Incorrect number of parameters."); return 0; } --- 151,155 ---- default: { ! wxlState.wxlua_Error("wxLua: wxEvtHandler Connect: Incorrect number of parameters."); return 0; } *************** *** 158,162 **** if (!lua_isfunction(L, func_idx)) { ! wxlState.terror(wxString::Format(wxT("wxLua: Connect: Callback function is not a valid Lua function for parameter %d."), func_idx-1)); // -1 for self return 0; --- 158,162 ---- if (!lua_isfunction(L, func_idx)) { ! wxlState.wxlua_Error(wxString::Format(wxT("wxLua: Connect: Callback function is not a valid Lua function for parameter %d."), func_idx-1)); // -1 for self return 0; *************** *** 167,171 **** else { ! wxlState.terror(wxString::Format(wxT("wxLua: Connect: Invalid wxEvent type, expected a number for parameter %d, got '%s'."), evttype_idx - 1, wxlState.lua_TypeNameIndex(evttype_idx).c_str())); return 0; --- 167,171 ---- else { ! wxlState.wxlua_Error(wxString::Format(wxT("wxLua: Connect: Invalid wxEvent type, expected a number for parameter %d, got '%s'."), evttype_idx - 1, wxlState.lua_TypeNameIndex(evttype_idx).c_str())); return 0; *************** *** 212,216 **** else { ! wxlState.terror(wxString::Format(wxT("wxLua: Disconnect: Invalid lastId, expected a number for parameter 2, got '%s'."), wxlState.lua_TypeNameIndex(3).c_str())); return 0; --- 212,216 ---- else { ! wxlState.wxlua_Error(wxString::Format(wxT("wxLua: Disconnect: Invalid lastId, expected a number for parameter 2, got '%s'."), wxlState.lua_TypeNameIndex(3).c_str())); return 0; *************** *** 221,225 **** else { ! wxlState.terror(wxString::Format(wxT("wxLua: Disconnect: Invalid winId, expected a number for parameter 1, got '%s'."), wxlState.lua_TypeNameIndex(2).c_str())); return 0; --- 221,225 ---- else { ! wxlState.wxlua_Error(wxString::Format(wxT("wxLua: Disconnect: Invalid winId, expected a number for parameter 1, got '%s'."), wxlState.lua_TypeNameIndex(2).c_str())); return 0; *************** *** 236,240 **** else { ! wxlState.terror(wxString::Format(wxT("wxLua: Disconnect: Invalid id, expected a number for parameter 1, got '%s'."), wxlState.lua_TypeNameIndex(2).c_str())); return 0; --- 236,240 ---- else { ! wxlState.wxlua_Error(wxString::Format(wxT("wxLua: Disconnect: Invalid id, expected a number for parameter 1, got '%s'."), wxlState.lua_TypeNameIndex(2).c_str())); return 0; *************** *** 251,255 **** default: { ! wxlState.terror("wxLua: Disconnect: Incorrect number of parameters."); return 0; } --- 251,255 ---- default: { ! wxlState.wxlua_Error("wxLua: Disconnect: Incorrect number of parameters."); return 0; } *************** *** 260,264 **** else { ! wxlState.terror(wxString::Format(wxT("wxLua: Disconnect: Invalid event type, expected a number for parameter %d, got '%s'."), evttype_idx - 1, wxlState.lua_TypeNameIndex(evttype_idx).c_str())); return 0; --- 260,264 ---- else { ! wxlState.wxlua_Error(wxString::Format(wxT("wxLua: Disconnect: Invalid event type, expected a number for parameter %d, got '%s'."), evttype_idx - 1, wxlState.lua_TypeNameIndex(evttype_idx).c_str())); return 0; Index: wxcore_gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_gdi.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxcore_gdi.cpp 8 Nov 2007 00:06:39 -0000 1.4 --- wxcore_gdi.cpp 17 Nov 2007 00:14:58 -0000 1.5 *************** *** 7670,7674 **** size_t nn = (size_t)n; if ((nn > blue_len)||(nn > green_len)||(nn > red_len)) ! wxlState.terror("Invalid palette lengths for wxPalette constructor"); // get this wxPalette *self = (wxPalette *)wxlState.GetUserDataType(1, s_wxluatag_wxPalette); --- 7670,7674 ---- size_t nn = (size_t)n; if ((nn > blue_len)||(nn > green_len)||(nn > red_len)) ! wxlState.wxlua_Error("Invalid palette lengths for wxPalette constructor"); // get this wxPalette *self = (wxPalette *)wxlState.GetUserDataType(1, s_wxluatag_wxPalette); Index: wxaui_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxaui_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxaui_bind.cpp 16 Jul 2007 19:35:17 -0000 1.1 --- wxaui_bind.cpp 17 Nov 2007 00:14:57 -0000 1.2 *************** *** 266,273 **** } ! void wxLuaBinding_wxaui::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxaui::PostRegister(const wxLuaState& , bool , int ) { } --- 266,273 ---- } ! void wxLuaBinding_wxaui::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxaui::PostRegister(const wxLuaState&, int ) { } Index: wxhtml_wxlhtmlwin.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxhtml_wxlhtmlwin.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxhtml_wxlhtmlwin.cpp 31 Jul 2007 23:30:57 -0000 1.3 --- wxhtml_wxlhtmlwin.cpp 17 Nov 2007 00:15:00 -0000 1.4 *************** *** 60,68 **** lua_State *L = m_wxlState.GetLuaState(); int nOldTop = lua_gettop(L); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaHtmlWindow, true); ! m_wxlState.tpushusertag(cell, s_wxluatag_wxHtmlCell, true); lua_pushnumber(L, x); lua_pushnumber(L, y); ! m_wxlState.tpushusertag((void *) &event, s_wxluatag_wxMouseEvent, true); m_wxlState.LuaPCall(5, 1); --- 60,68 ---- lua_State *L = m_wxlState.GetLuaState(); int nOldTop = lua_gettop(L); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaHtmlWindow, true); ! m_wxlState.wxluaT_PushUserTag(cell, s_wxluatag_wxHtmlCell, true); lua_pushnumber(L, x); lua_pushnumber(L, y); ! m_wxlState.wxluaT_PushUserTag((void *) &event, s_wxluatag_wxMouseEvent, true); m_wxlState.LuaPCall(5, 1); *************** *** 99,104 **** lua_State *L = m_wxlState.GetLuaState(); int nOldTop = lua_gettop(L); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaHtmlWindow, true); ! m_wxlState.tpushusertag(cell, s_wxluatag_wxHtmlCell, true); lua_pushnumber(L, x); lua_pushnumber(L, y); --- 99,104 ---- lua_State *L = m_wxlState.GetLuaState(); int nOldTop = lua_gettop(L); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaHtmlWindow, true); ! m_wxlState.wxluaT_PushUserTag(cell, s_wxluatag_wxHtmlCell, true); lua_pushnumber(L, x); lua_pushnumber(L, y); *************** *** 120,125 **** lua_State *L = m_wxlState.GetLuaState(); int nOldTop = lua_gettop(L); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaHtmlWindow, true); ! m_wxlState.tpushusertag((void *) &link, s_wxluatag_wxHtmlLinkInfo, true); m_wxlState.LuaPCall(2, 0); --- 120,125 ---- lua_State *L = m_wxlState.GetLuaState(); int nOldTop = lua_gettop(L); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaHtmlWindow, true); ! m_wxlState.wxluaT_PushUserTag((void *) &link, s_wxluatag_wxHtmlLinkInfo, true); m_wxlState.LuaPCall(2, 0); *************** *** 139,143 **** lua_State *L = m_wxlState.GetLuaState(); int nOldTop = lua_gettop(L); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaHtmlWindow, true); m_wxlState.lua_PushString(title); --- 139,143 ---- lua_State *L = m_wxlState.GetLuaState(); int nOldTop = lua_gettop(L); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaHtmlWindow, true); m_wxlState.lua_PushString(title); Index: wxaui_aui.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxaui_aui.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxaui_aui.cpp 8 Nov 2007 00:06:38 -0000 1.4 --- wxaui_aui.cpp 17 Nov 2007 00:14:57 -0000 1.5 *************** *** 1139,1143 **** wxLuaState wxlState(L); // int x_extent ! int * x_extent = (int *)wxlState.ttouserdata(9); // wxRect out_button_rect wxRect * out_button_rect = (wxRect *)wxlState.GetUserDataType(8, s_wxluatag_wxRect); --- 1139,1143 ---- wxLuaState wxlState(L); // int x_extent ! int * x_extent = (int *)wxlState.wxlua_ToUserdata(9); // wxRect out_button_rect wxRect * out_button_rect = (wxRect *)wxlState.GetUserDataType(8, s_wxluatag_wxRect); *************** *** 1220,1224 **** wxSize *returns; // int x_extent ! int * x_extent = (int *)wxlState.ttouserdata(8); // int close_button_state int close_button_state = (int)wxlua_getnumbertype(L, 7); --- 1220,1224 ---- wxSize *returns; // int x_extent ! int * x_extent = (int *)wxlState.wxlua_ToUserdata(8); // int close_button_state int close_button_state = (int)wxlua_getnumbertype(L, 7); *************** *** 5912,5918 **** wxLuaState wxlState(L); // double height_pct ! double * height_pct = (double *)wxlState.ttouserdata(3); // double width_pct ! double * width_pct = (double *)wxlState.ttouserdata(2); // get this wxAuiManager * self = (wxAuiManager *)wxlState.GetUserDataType(1, s_wxluatag_wxAuiManager); --- 5912,5918 ---- wxLuaState wxlState(L); // double height_pct ! double * height_pct = (double *)wxlState.wxlua_ToUserdata(3); // double width_pct ! double * width_pct = (double *)wxlState.wxlua_ToUserdata(2); // get this wxAuiManager * self = (wxAuiManager *)wxlState.GetUserDataType(1, s_wxluatag_wxAuiManager); Index: wxxrc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxxrc_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxxrc_bind.cpp 16 Jul 2007 19:35:23 -0000 1.1 --- wxxrc_bind.cpp 17 Nov 2007 00:15:00 -0000 1.2 *************** *** 157,164 **** } ! void wxLuaBinding_wxxrc::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxxrc::PostRegister(const wxLuaState& , bool , int ) { } --- 157,164 ---- } ! void wxLuaBinding_wxxrc::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxxrc::PostRegister(const wxLuaState&, int ) { } Index: wxgl_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxgl_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxgl_bind.cpp 16 Jul 2007 19:35:21 -0000 1.1 --- wxgl_bind.cpp 17 Nov 2007 00:14:59 -0000 1.2 *************** *** 171,178 **** } ! void wxLuaBinding_wxgl::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxgl::PostRegister(const wxLuaState& , bool , int ) { } --- 171,178 ---- } ! void wxLuaBinding_wxgl::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxgl::PostRegister(const wxLuaState&, int ) { } Index: wxmedia_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxmedia_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxmedia_bind.cpp 16 Jul 2007 19:35:22 -0000 1.1 --- wxmedia_bind.cpp 17 Nov 2007 00:15:00 -0000 1.2 *************** *** 201,208 **** } ! void wxLuaBinding_wxmedia::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxmedia::PostRegister(const wxLuaState& , bool , int ) { } --- 201,208 ---- } ! void wxLuaBinding_wxmedia::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxmedia::PostRegister(const wxLuaState&, int ) { } Index: wxcore_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxcore_bind.cpp 7 Aug 2007 20:23:25 -0000 1.4 --- wxcore_bind.cpp 17 Nov 2007 00:14:58 -0000 1.5 *************** *** 3849,3853 **** // wxKillError rc = NULL wxKillError rc = wxKILL_OK; ! //wxKillError * rc = (argCount >= 3 ? (wxKillError *)wxlState.ttouserdata(3) : NULL); // wxSignal sig = wxSIGTERM wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getintegertype(L, 2) : wxSIGTERM); --- 3849,3853 ---- // wxKillError rc = NULL wxKillError rc = wxKILL_OK; ! //wxKillError * rc = (argCount >= 3 ? (wxKillError *)wxlState.wxluaT_ToUserdata(3) : NULL); // wxSignal sig = wxSIGTERM wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getintegertype(L, 2) : wxSIGTERM); *************** *** 5154,5158 **** } ! void wxLuaBinding_wxcore::PreRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable) { #if defined(__MINGW32__) || defined(__GNUWIN32__) --- 5154,5158 ---- } ! void wxLuaBinding_wxcore::PreRegister(const wxLuaState& wxlState, int luaTable) { #if defined(__MINGW32__) || defined(__GNUWIN32__) *************** *** 5210,5214 **** } } ! void wxLuaBinding_wxcore::PostRegister(const wxLuaState& , bool , int ) { } --- 5210,5214 ---- } } ! void wxLuaBinding_wxcore::PostRegister(const wxLuaState&, int ) { } Index: wxcore_controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_controls.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxcore_controls.cpp 1 Aug 2007 19:15:35 -0000 1.3 --- wxcore_controls.cpp 17 Nov 2007 00:14:58 -0000 1.4 *************** *** 4540,4544 **** } else ! wxlState.terror(wxString::Format(_("wxLua: Expected lua function(long item1, long item2, long data) for parameter %d, but got '%s'."), 2, wxlState.lua_TypeNameIndex(1).c_str())); // get this --- 4540,4544 ---- } else ! wxlState.wxlua_Error(wxString::Format(_("wxLua: Expected lua function(long item1, long item2, long data) for parameter %d, but got '%s'."), 2, wxlState.lua_TypeNameIndex(1).c_str())); // get this Index: wxxml_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxxml_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxxml_bind.cpp 16 Jul 2007 19:35:23 -0000 1.1 --- wxxml_bind.cpp 17 Nov 2007 00:15:00 -0000 1.2 *************** *** 169,176 **** } ! void wxLuaBinding_wxxml::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxxml::PostRegister(const wxLuaState& , bool , int ) { } --- 169,176 ---- } ! void wxLuaBinding_wxxml::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxxml::PostRegister(const wxLuaState&, int ) { } Index: wxbase_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxbase_bind.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxbase_bind.cpp 19 Jul 2007 03:09:46 -0000 1.2 --- wxbase_bind.cpp 17 Nov 2007 00:14:57 -0000 1.3 *************** *** 2487,2494 **** } ! void wxLuaBinding_wxbase::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxbase::PostRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable) { wxLuaState wxLS(wxlState); --- 2487,2494 ---- } ! void wxLuaBinding_wxbase::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxbase::PostRegister(const wxLuaState& wxlState, int luaTable) { wxLuaState wxLS(wxlState); *************** *** 2496,2504 **** lua_State* L = wxLS.GetLuaState(); ! if (registerTypes) ! g_wxluatag_NULL = wxLS.tnewtag(); lua_pushlstring(L, "NULL", 4); ! wxLS.tpushusertag(NULL, g_wxluatag_NULL, true); lua_rawset(L, luaTable); } --- 2496,2503 ---- lua_State* L = wxLS.GetLuaState(); ! g_wxluatag_NULL = wxLS.wxluaT_NewTag(); lua_pushlstring(L, "NULL", 4); ! wxLS.wxluaT_PushUserTag(NULL, g_wxluatag_NULL, true); lua_rawset(L, luaTable); } Index: wxstc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxstc_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxstc_bind.cpp 16 Jul 2007 19:35:23 -0000 1.1 --- wxstc_bind.cpp 17 Nov 2007 00:15:00 -0000 1.2 *************** *** 1536,1543 **** } ! void wxLuaBinding_wxstc::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxstc::PostRegister(const wxLuaState& , bool , int ) { } --- 1536,1543 ---- } ! void wxLuaBinding_wxstc::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxstc::PostRegister(const wxLuaState&, int ) { } Index: wxcore_wxlprint.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_wxlprint.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxcore_wxlprint.cpp 19 Jul 2007 03:09:46 -0000 1.2 --- wxcore_wxlprint.cpp 17 Nov 2007 00:14:59 -0000 1.3 *************** *** 56,60 **** { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 4); --- 56,60 ---- { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 4); *************** *** 86,90 **** { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.lua_PushNumber(pageNum); --- 86,90 ---- { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.lua_PushNumber(pageNum); *************** *** 135,139 **** { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.lua_PushNumber(startPage); m_wxlState.lua_PushNumber(endPage); --- 135,139 ---- { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.lua_PushNumber(startPage); m_wxlState.lua_PushNumber(endPage); *************** *** 164,168 **** { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 0); m_wxlState.lua_SetTop(nOldTop); --- 164,168 ---- { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 0); m_wxlState.lua_SetTop(nOldTop); *************** *** 180,184 **** { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 0); m_wxlState.lua_SetTop(nOldTop); --- 180,184 ---- { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 0); m_wxlState.lua_SetTop(nOldTop); *************** *** 196,200 **** { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 0); m_wxlState.lua_SetTop(nOldTop); --- 196,200 ---- { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 0); m_wxlState.lua_SetTop(nOldTop); *************** *** 212,216 **** { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 0); m_wxlState.lua_SetTop(nOldTop); --- 212,216 ---- { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.LuaPCall(1, 0); m_wxlState.lua_SetTop(nOldTop); *************** *** 230,234 **** { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.lua_PushNumber(pageNum); --- 230,234 ---- { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.lua_PushNumber(pageNum); *************** *** 252,256 **** { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.lua_PushString(val); --- 252,256 ---- { int nOldTop = m_wxlState.lua_GetTop(); ! m_wxlState.wxluaT_PushUserTag(this, s_wxluatag_wxLuaPrintout, true); m_wxlState.lua_PushString(val); Index: wxhtml_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxhtml_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxhtml_bind.cpp 16 Jul 2007 19:35:21 -0000 1.1 --- wxhtml_bind.cpp 17 Nov 2007 00:14:59 -0000 1.2 *************** *** 242,249 **** } ! void wxLuaBinding_wxhtml::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxhtml::PostRegister(const wxLuaState& , bool , int ) { } --- 242,249 ---- } ! void wxLuaBinding_wxhtml::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxhtml::PostRegister(const wxLuaState&, int ) { } Index: wxcore_image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_image.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxcore_image.cpp 1 Aug 2007 19:15:36 -0000 1.3 --- wxcore_image.cpp 17 Nov 2007 00:14:58 -0000 1.4 *************** *** 1449,1453 **** wxImage *self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); // call SetData ! if ((len == 0) || !self->Ok()) wxlState.terror("Invalid data or wxImage to SetAlphaData to"); // don't actually call SetAlpha since it takes ownership of data // just copy it to the image --- 1449,1453 ---- wxImage *self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); // call SetData ! if ((len == 0) || !self->Ok()) wxlState.wxlua_Error("Invalid data or wxImage to SetAlphaData to"); // don't actually call SetAlpha since it takes ownership of data // just copy it to the image *************** *** 1495,1499 **** wxImage *self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); // call SetData ! if ((len == 0) || !self->Ok()) wxlState.terror("Invalid data or wxImage to SetData to"); // don't actually call SetData since it takes ownership of data // just copy it to the image --- 1495,1499 ---- wxImage *self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); // call SetData ! if ((len == 0) || !self->Ok()) wxlState.wxlua_Error("Invalid data or wxImage to SetData to"); // don't actually call SetData since it takes ownership of data // just copy it to the image *************** *** 2456,2460 **** static int LUACALL wxLua_wxImageHistogram_iterator_Set_first(lua_State *L) { ! wxlua_terror(L, "You cannot set the first element of a wxHashTable, do not use wxImageHistogram::iterator::SetFirst()."); return 0; /* --- 2456,2460 ---- static int LUACALL wxLua_wxImageHistogram_iterator_Set_first(lua_State *L) { ! wxlua_error(L, "You cannot set the first element of a wxHashTable, do not use wxImageHistogram::iterator::SetFirst()."); return 0; /* Index: wxnet_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxnet_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxnet_bind.cpp 16 Jul 2007 19:35:23 -0000 1.1 --- wxnet_bind.cpp 17 Nov 2007 00:15:00 -0000 1.2 *************** *** 247,254 **** } ! void wxLuaBinding_wxnet::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxnet::PostRegister(const wxLuaState& , bool , int ) { } --- 247,254 ---- } ! void wxLuaBinding_wxnet::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxnet::PostRegister(const wxLuaState&, int ) { } Index: wxbase_data.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxbase_data.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxbase_data.cpp 1 Aug 2007 19:15:35 -0000 1.4 --- wxbase_data.cpp 17 Nov 2007 00:14:58 -0000 1.5 *************** *** 610,614 **** { lua_pushvalue(L, 1); ! wxObject *pObject = (wxObject *)wxlState.ttouserdata( 1 ); const wxLuaBindClass *pClass = wxlState.GetLuaClass(className); --- 610,614 ---- { lua_pushvalue(L, 1); ! wxObject *pObject = (wxObject *)wxlState.wxlua_ToUserdata( 1 ); const wxLuaBindClass *pClass = wxlState.GetLuaClass(className); *************** *** 617,632 **** if (pObject->IsKindOf(pClass->classInfo)) { ! wxlState.tsettag(*pClass->class_tag); iResult = 1; } else ! wxlState.terror("wxLua: DynamicCast: Unable to cast to a class of this type."); } if (iResult == 0) ! wxlState.terror("wxObject:DynamicCast: Class not found."); } else ! wxlState.terror("wxObject:DynamicCast: Expected a string name of the class for parameter 2."); return iResult; --- 617,632 ---- if (pObject->IsKindOf(pClass->classInfo)) { ! wxlState.wxluaT_SetTag(*pClass->class_tag); iResult = 1; } else ! wxlState.wxlua_Error("wxLua: DynamicCast: Unable to cast to a class of this type."); } if (iResult == 0) ! wxlState.wxlua_Error("wxObject:DynamicCast: Class not found."); } else ! wxlState.wxlua_Error("wxObject:DynamicCast: Expected a string name of the class for parameter 2."); return iResult; Index: wxadv_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxadv_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxadv_bind.cpp 16 Jul 2007 19:35:15 -0000 1.1 --- wxadv_bind.cpp 17 Nov 2007 00:14:57 -0000 1.2 *************** *** 465,472 **** } ! void wxLuaBinding_wxadv::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxadv::PostRegister(const wxLuaState& , bool , int ) { } --- 465,472 ---- } ! void wxLuaBinding_wxadv::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxadv::PostRegister(const wxLuaState&, int ) { } Index: wxrichtext_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxrichtext_bind.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxrichtext_bind.cpp 16 Jul 2007 19:35:23 -0000 1.1 --- wxrichtext_bind.cpp 17 Nov 2007 00:15:00 -0000 1.2 *************** *** 156,163 **** } ! void wxLuaBinding_wxrichtext::PreRegister(const wxLuaState& , bool , int ) { } ! void wxLuaBinding_wxrichtext::PostRegister(const wxLuaState& , bool , int ) { } --- 156,163 ---- } ! void wxLuaBinding_wxrichtext::PreRegister(const wxLuaState& , int ) { } ! void wxLuaBinding_wxrichtext::PostRegister(const wxLuaState&, int ) { } |