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...> - 2008-12-03 05:26:08
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3179/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: Make wxLuaEdit print items on the stack and use '=' as the Lua executable. Changed wxLuaState::RunBuffer() to take const char*, not const unsigned char*. Allow wxLuaState::RunString/Buffer() to leave values on the stack. Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.174 retrieving revision 1.175 diff -C2 -d -r1.174 -r1.175 *** wxlstate.cpp 17 Mar 2008 03:05:04 -0000 1.174 --- wxlstate.cpp 3 Dec 2008 05:26:03 -0000 1.175 *************** *** 277,281 **** if (line_num_) *line_num_ = (int)line_num; ! return false; } --- 277,281 ---- if (line_num_) *line_num_ = (int)line_num; ! return true; } *************** *** 2525,2529 **** // ---------------------------------------------------------------------------- ! int wxLuaState::RunFile(const wxString &filename) { wxCHECK_MSG(Ok(), LUA_ERRRUN, wxT("Lua interpreter not created")); --- 2525,2529 ---- // ---------------------------------------------------------------------------- ! int wxLuaState::RunFile(const wxString &filename, int nresults) { wxCHECK_MSG(Ok(), LUA_ERRRUN, wxT("Lua interpreter not created")); *************** *** 2536,2544 **** int status = luaL_LoadFile(wx2lua(filename)); if (status == 0) ! status = LuaPCall(0, 0); // no args and no results else SendLuaErrorEvent(status, top); // compilation error ! lua_SetTop(top); // restore original top (removes err msg) M_WXLSTATEDATA->m_wxlStateData->m_debug_hook_break = false; --- 2536,2545 ---- int status = luaL_LoadFile(wx2lua(filename)); if (status == 0) ! status = LuaPCall(0, nresults); // no args and nresults else SendLuaErrorEvent(status, top); // compilation error ! if (nresults == 0) ! lua_SetTop(top); // restore original top (removes err msg) M_WXLSTATEDATA->m_wxlStateData->m_debug_hook_break = false; *************** *** 2548,2558 **** } ! int wxLuaState::RunString(const wxString &script, const wxString& name) { wxLuaCharBuffer buf(script); ! return RunBuffer((unsigned char*)buf.GetData(), buf.Length(), name); } ! int wxLuaState::RunBuffer(const unsigned char buf[], size_t size, const wxString &name) { wxCHECK_MSG(Ok(), LUA_ERRRUN, wxT("Invalid wxLuaState")); --- 2549,2559 ---- } ! int wxLuaState::RunString(const wxString &script, const wxString& name, int nresults) { wxLuaCharBuffer buf(script); ! return RunBuffer(buf.GetData(), buf.Length(), name, nresults); } ! int wxLuaState::RunBuffer(const char buf[], size_t size, const wxString &name, int nresults) { wxCHECK_MSG(Ok(), LUA_ERRRUN, wxT("Invalid wxLuaState")); *************** *** 2563,2573 **** int top = lua_GetTop(); ! int status = luaL_LoadBuffer((const char*)buf, size, wx2lua(name)); if (status == 0) ! status = LuaPCall(0, 0); // no args and no results else SendLuaErrorEvent(status, top); // compilation error ! lua_SetTop(top); // restore original top (removes err msg) M_WXLSTATEDATA->m_wxlStateData->m_debug_hook_break = false; --- 2564,2575 ---- int top = lua_GetTop(); ! int status = luaL_LoadBuffer(buf, size, wx2lua(name)); if (status == 0) ! status = LuaPCall(0, nresults); // no args and nresults else SendLuaErrorEvent(status, top); // compilation error ! if (nresults == 0) ! lua_SetTop(top); // restore original top (removes err msg) M_WXLSTATEDATA->m_wxlStateData->m_debug_hook_break = false; *************** *** 2618,2622 **** --- 2620,2627 ---- if (status != 0) + { SendLuaErrorEvent(status, top - (narg + 1)); + lua_settop(L, top); // restore original top (removes err msg) + } return status; *************** *** 2652,2658 **** { wxLuaCharBuffer buf(script); ! return CompileBuffer((unsigned char*)buf.GetData(), buf.Length(), name, errMsg_, line_num_); } ! int wxLuaState::CompileBuffer(const unsigned char buf[], size_t size, const wxString &name, wxString* errMsg_, int* line_num_) { // create a new lua_State so we don't mess up our own --- 2657,2663 ---- { wxLuaCharBuffer buf(script); ! return CompileBuffer(buf.GetData(), buf.Length(), name, errMsg_, line_num_); } ! int wxLuaState::CompileBuffer(const char buf[], size_t size, const wxString &name, wxString* errMsg_, int* line_num_) { // create a new lua_State so we don't mess up our own *************** *** 2661,2667 **** int top = lua_gettop(L); int status = luaL_loadbuffer(L, (const char*)buf, size, wx2lua(name)); ! status = wxlua_errorinfo(L, status, top, errMsg_, line_num_); lua_close(L); - return 1; return status; } --- 2666,2671 ---- int top = lua_gettop(L); int status = luaL_loadbuffer(L, (const char*)buf, size, wx2lua(name)); ! wxlua_errorinfo(L, status, top, errMsg_, line_num_); lua_close(L); return status; } |
From: John L. <jr...@us...> - 2008-12-03 05:26:08
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3179/wxLua/apps/wxluaedit/src Modified Files: wxledit.cpp wxluaedit.cpp Log Message: Make wxLuaEdit print items on the stack and use '=' as the Lua executable. Changed wxLuaState::RunBuffer() to take const char*, not const unsigned char*. Allow wxLuaState::RunString/Buffer() to leave values on the stack. Index: wxluaedit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** wxluaedit.cpp 20 Jul 2007 01:39:05 -0000 1.38 --- wxluaedit.cpp 3 Dec 2008 05:26:03 -0000 1.39 *************** *** 456,459 **** --- 456,460 ---- shell->AppendText(wxT(" Enter lua code and press <enter> to run it.\n")); shell->AppendText(wxT(" Multiline code can be typed by pressing <shift>+<enter>.\n")); + shell->AppendText(wxT(" Values can be printed by prepending '=' or 'return'.\n")); shell->AppendText(wxT(" The wxLua intrepreter can be restarted with the command 'reset'.\n")); shell->MarkerDeleteAll(wxSTEditorShell::markerPrompt); Index: wxledit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxledit.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** wxledit.cpp 26 Jan 2008 23:27:24 -0000 1.35 --- wxledit.cpp 3 Dec 2008 05:26:03 -0000 1.36 *************** *** 127,135 **** } ! bool wxLuaShell::RunString(const wxString& string, bool append_text) { bool ret = false; ! if (string.IsEmpty()) return ret; --- 127,137 ---- } ! bool wxLuaShell::RunString(const wxString& string_, bool append_text) { bool ret = false; ! wxString string(string_); ! ! if (string.Trim(true).Trim(false).IsEmpty()) return ret; *************** *** 163,167 **** } else if (m_wxlState.Ok()) ! ret = m_wxlState.RunString(string, wxT("wxLuaShell")) == 0; else AppendText(wxT("The lua interpreter is not available - try running 'reset'.\n")); --- 165,192 ---- } else if (m_wxlState.Ok()) ! { ! // allow for syntax of "= 1+2+3" to print result ! if (string.Trim(true).Find(wxT('=')) == 0) ! string = wxT("return ") + string.AfterFirst('='); ! ! if (0 != m_wxlState.CompileString(string)) ! { ! // try to see if we can return the value w/o error to print it ! if (0 == m_wxlState.CompileString(wxT("return ") + string)) ! string = wxT("return ") + string; ! } ! ! int top1 = m_wxlState.lua_GetTop(); ! ret = m_wxlState.RunString(string, wxT("wxLuaShell"), LUA_MULTRET) == 0; ! int top2 = m_wxlState.lua_GetTop(); ! ! if (ret && (top2 > top1)) ! { ! for (int n = top1+1; n <= top2; n++) ! AppendText(m_wxlState.lua_TowxString(n) + wxT("\n")); ! } ! ! m_wxlState.lua_SetTop(top1); ! } else AppendText(wxT("The lua interpreter is not available - try running 'reset'.\n")); |
From: John L. <jr...@us...> - 2008-12-03 05:26:08
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3179/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: Make wxLuaEdit print items on the stack and use '=' as the Lua executable. Changed wxLuaState::RunBuffer() to take const char*, not const unsigned char*. Allow wxLuaState::RunString/Buffer() to leave values on the stack. Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** wxlstate.h 26 Mar 2008 05:01:33 -0000 1.121 --- wxlstate.h 3 Dec 2008 05:26:03 -0000 1.122 *************** *** 789,816 **** // Run a Lua file from disk using lua_loadfile() then LuaPCall(). ! // Leaves nothing on the stack. // Returns 0 on success or Lua's error code. // Sends a wxEVT_LUA_ERROR wxLuaEvent on error. ! int RunFile(const wxString &fileName); // Run a string that contains Lua code using luaL_loadbuffer() then LuaPCall(). ! // Leaves nothing on the stack. // Returns 0 on success or Lua's error code. // Sends a wxEVT_LUA_ERROR wxLuaEvent on error. ! int RunString(const wxString &script, const wxString& name = wxEmptyString); // Run a char array #included from bin2c compilation or something else // using luaL_loadbuffer() then LuaPCall(). ! // Leaves nothing on the stack. // Returns 0 on success or Lua's error code. // Sends a wxEVT_LUA_ERROR wxLuaEvent on error. ! int RunBuffer(const unsigned char buf[], size_t size, const wxString &name = wxT("= lua")); ! int LuaDoString(const wxString &script, const wxString& name = wxEmptyString) { return RunString(script, name); } ! int LuaDoFile(const wxString &filename) { return RunFile(filename); } ! int LuaDoBuffer(const char *buffer, size_t len, const char *name) { return RunBuffer((const unsigned char*)buffer, len, lua2wx(name)); } // Is a program running now, running state is set for Run/File/String/Buffer bool IsRunning() const; ! // Replacement for lua_pcall(), leaves nothing on the stack even on error. // Returns 0 on success or Lua's error code. // Sends a wxEVT_LUA_ERROR wxLuaEvent on error. --- 789,816 ---- // Run a Lua file from disk using lua_loadfile() then LuaPCall(). ! // Leaves nresults on the stack, use LUA_MULTRET to leave them all. // Returns 0 on success or Lua's error code. // Sends a wxEVT_LUA_ERROR wxLuaEvent on error. ! int RunFile(const wxString &fileName, int nresults = 0); // Run a string that contains Lua code using luaL_loadbuffer() then LuaPCall(). ! // Leaves nresults on the stack, use LUA_MULTRET to leave them all. // Returns 0 on success or Lua's error code. // Sends a wxEVT_LUA_ERROR wxLuaEvent on error. ! int RunString(const wxString &script, const wxString& name = wxEmptyString, int nresults = 0); // Run a char array #included from bin2c compilation or something else // using luaL_loadbuffer() then LuaPCall(). ! // Leaves nresults on the stack, use LUA_MULTRET to leave them all. // Returns 0 on success or Lua's error code. // Sends a wxEVT_LUA_ERROR wxLuaEvent on error. ! int RunBuffer(const char buf[], size_t size, const wxString &name = wxT("= lua"), int nresults = 0); ! int LuaDoString(const wxString &script, const wxString& name = wxEmptyString, int nresults = 0) { return RunString(script, name, nresults); } ! int LuaDoFile(const wxString &filename, int nresults = 0) { return RunFile(filename, nresults); } ! int LuaDoBuffer(const char *buffer, size_t len, const char *name, int nresults = 0) { return RunBuffer(buffer, len, lua2wx(name), nresults); } // Is a program running now, running state is set for Run/File/String/Buffer bool IsRunning() const; ! // Replacement for lua_pcall() // Returns 0 on success or Lua's error code. // Sends a wxEVT_LUA_ERROR wxLuaEvent on error. *************** *** 838,842 **** int CompileString(const wxString &script, const wxString& name = wxEmptyString, wxString* errMsg = NULL, int* line_num = NULL); ! int CompileBuffer(const unsigned char buf[], size_t size, const wxString &name = wxEmptyString, wxString* errMsg = NULL, int* line_num = NULL); --- 838,842 ---- int CompileString(const wxString &script, const wxString& name = wxEmptyString, wxString* errMsg = NULL, int* line_num = NULL); ! int CompileBuffer(const char buf[], size_t size, const wxString &name = wxEmptyString, wxString* errMsg = NULL, int* line_num = NULL); |
From: John L. <jr...@us...> - 2008-12-03 05:26:08
|
Update of /cvsroot/wxlua/wxLua/docs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3179/wxLua/docs Modified Files: changelog.txt Log Message: Make wxLuaEdit print items on the stack and use '=' as the Lua executable. Changed wxLuaState::RunBuffer() to take const char*, not const unsigned char*. Allow wxLuaState::RunString/Buffer() to leave values on the stack. Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** changelog.txt 27 Oct 2008 02:27:19 -0000 1.65 --- changelog.txt 3 Dec 2008 05:26:03 -0000 1.66 *************** *** 11,14 **** --- 11,20 ---- You will need to swap the parameters for it in your bindings. Example: %typedef long wxTextCoord + - Added more C/C++ operators in the bindings. + - wxLuaEdit now prints values in the console like the Lua executable. + * Changed signature of wxLuaState::RunBuffer() to take a const char* + instead of an const unsigned char*, cast to (const char*) as appropriate. + - Allow wxLuaState::RunString/Buffer() and friends to allow for values left + on the stack. The default is to leave none as before. version 2.8.7.0 (released 02/02/2008) |
From: John L. <jr...@us...> - 2008-12-03 05:26:08
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3179/wxLua/apps/wxlua/src Modified Files: wxlua.cpp Log Message: Make wxLuaEdit print items on the stack and use '=' as the Lua executable. Changed wxLuaState::RunBuffer() to take const char*, not const unsigned char*. Allow wxLuaState::RunString/Buffer() to leave values on the stack. Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** wxlua.cpp 20 Jan 2008 19:23:00 -0000 1.52 --- wxlua.cpp 3 Dec 2008 05:26:03 -0000 1.53 *************** *** 257,261 **** wxlua_pushargs(m_wxlState.GetLuaState(), argv, argc, arg_count); ! int rc = m_wxlState.RunBuffer(wxLuaEditor, wxLuaEditor_len, m_programName); run_ok = (rc == 0); if (rc != 0) --- 257,261 ---- wxlua_pushargs(m_wxlState.GetLuaState(), argv, argc, arg_count); ! int rc = m_wxlState.RunBuffer((const char*)wxLuaEditor, wxLuaEditor_len, m_programName); run_ok = (rc == 0); if (rc != 0) |
From: John L. <jr...@us...> - 2008-12-02 05:20:08
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23808/wxLua/modules/wxbind/src Modified Files: wxadv_wxladv.cpp wxcore_wxlcore.cpp wxhtml_wxlhtml.cpp Log Message: Check return value of PCall() and only if it's 0 try to get values from Lua in overridden virtual functions. Index: wxadv_wxladv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxadv_wxladv.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxadv_wxladv.cpp 31 Jan 2008 04:34:07 -0000 1.1 --- wxadv_wxladv.cpp 2 Dec 2008 05:20:03 -0000 1.2 *************** *** 47,52 **** m_wxlState.wxluaT_PushUserDataType(this, wxluatype_wxLuaGridTableBase, true); ! m_wxlState.LuaPCall(1, 1); ! numrows = (int)m_wxlState.GetNumberType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 47,53 ---- m_wxlState.wxluaT_PushUserDataType(this, wxluatype_wxLuaGridTableBase, true); ! if (m_wxlState.LuaPCall(1, 1) == 0) ! numrows = (int)m_wxlState.GetNumberType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 68,73 **** m_wxlState.wxluaT_PushUserDataType(this, wxluatype_wxLuaGridTableBase, true); ! m_wxlState.LuaPCall(1, 1); ! numcols = (int)m_wxlState.GetNumberType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 69,75 ---- m_wxlState.wxluaT_PushUserDataType(this, wxluatype_wxLuaGridTableBase, true); ! if (m_wxlState.LuaPCall(1, 1) == 0) ! numcols = (int)m_wxlState.GetNumberType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 91,96 **** m_wxlState.lua_PushNumber(col); ! m_wxlState.LuaPCall(3, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 93,99 ---- m_wxlState.lua_PushNumber(col); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 114,119 **** m_wxlState.lua_PushNumber(col); ! m_wxlState.LuaPCall(3, 1); ! val = m_wxlState.GetwxStringType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 117,123 ---- m_wxlState.lua_PushNumber(col); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! val = m_wxlState.GetwxStringType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 158,163 **** m_wxlState.lua_PushNumber(col); ! m_wxlState.LuaPCall(3, 1); ! val = m_wxlState.GetwxStringType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 162,168 ---- m_wxlState.lua_PushNumber(col); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! val = m_wxlState.GetwxStringType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 184,189 **** m_wxlState.lua_PushString(typeName); ! m_wxlState.LuaPCall(4, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 189,195 ---- m_wxlState.lua_PushString(typeName); ! if (m_wxlState.LuaPCall(4, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 210,215 **** m_wxlState.lua_PushString(typeName); ! m_wxlState.LuaPCall(4, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 216,222 ---- m_wxlState.lua_PushString(typeName); ! if (m_wxlState.LuaPCall(4, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 236,241 **** m_wxlState.lua_PushNumber(col); ! m_wxlState.LuaPCall(3, 1); ! lResult = m_wxlState.GetIntegerType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 243,249 ---- m_wxlState.lua_PushNumber(col); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! lResult = m_wxlState.GetIntegerType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 261,266 **** m_wxlState.lua_PushNumber(col); ! m_wxlState.LuaPCall(3, 1); ! dResult = m_wxlState.GetNumberType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 269,275 ---- m_wxlState.lua_PushNumber(col); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! dResult = m_wxlState.GetNumberType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 286,291 **** m_wxlState.lua_PushNumber(col); ! m_wxlState.LuaPCall(3, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 295,301 ---- m_wxlState.lua_PushNumber(col); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 407,412 **** m_wxlState.lua_PushNumber(numRows); ! m_wxlState.LuaPCall(3, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 417,423 ---- m_wxlState.lua_PushNumber(numRows); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 431,436 **** m_wxlState.lua_PushNumber(numRows); ! m_wxlState.LuaPCall(2, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 442,448 ---- m_wxlState.lua_PushNumber(numRows); ! if (m_wxlState.LuaPCall(2, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 456,461 **** m_wxlState.lua_PushNumber(numRows); ! m_wxlState.LuaPCall(3, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 468,474 ---- m_wxlState.lua_PushNumber(numRows); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 481,486 **** m_wxlState.lua_PushNumber(numCols); ! m_wxlState.LuaPCall(3, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 494,500 ---- m_wxlState.lua_PushNumber(numCols); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 505,510 **** m_wxlState.lua_PushNumber(numCols); ! m_wxlState.LuaPCall(2, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 519,525 ---- m_wxlState.lua_PushNumber(numCols); ! if (m_wxlState.LuaPCall(2, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 530,535 **** m_wxlState.lua_PushNumber(numCols); ! m_wxlState.LuaPCall(3, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 545,551 ---- m_wxlState.lua_PushNumber(numCols); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 554,559 **** m_wxlState.lua_PushNumber(row); ! m_wxlState.LuaPCall(2, 1); ! val = m_wxlState.GetwxStringType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 570,576 ---- m_wxlState.lua_PushNumber(row); ! if (m_wxlState.LuaPCall(2, 1) == 0) ! val = m_wxlState.GetwxStringType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 578,583 **** m_wxlState.lua_PushNumber(col); ! m_wxlState.LuaPCall(2, 1); ! val = m_wxlState.GetwxStringType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 595,601 ---- m_wxlState.lua_PushNumber(col); ! if (m_wxlState.LuaPCall(2, 1) == 0) ! val = m_wxlState.GetwxStringType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 649,654 **** m_wxlState.wxluaT_PushUserDataType(this, wxluatype_wxLuaGridTableBase, true); ! m_wxlState.LuaPCall(1, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 667,673 ---- m_wxlState.wxluaT_PushUserDataType(this, wxluatype_wxLuaGridTableBase, true); ! if (m_wxlState.LuaPCall(1, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 679,684 **** m_wxlState.lua_PushInteger(kind); ! m_wxlState.LuaPCall(4, 1); ! attr = (wxGridCellAttr*)m_wxlState.GetUserDataType(-1, wxluatype_wxGridCellAttr); m_wxlState.lua_SetTop(nOldTop); } --- 698,704 ---- m_wxlState.lua_PushInteger(kind); ! if (m_wxlState.LuaPCall(4, 1) == 0) ! attr = (wxGridCellAttr*)m_wxlState.GetUserDataType(-1, wxluatype_wxGridCellAttr); ! m_wxlState.lua_SetTop(nOldTop); } Index: wxcore_wxlcore.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_wxlcore.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxcore_wxlcore.cpp 23 Jan 2008 06:43:38 -0000 1.3 --- wxcore_wxlcore.cpp 2 Dec 2008 05:20:03 -0000 1.4 *************** *** 60,69 **** m_wxlState.wxluaT_PushUserDataType(this, wxluatype_wxLuaPrintout, true); ! m_wxlState.LuaPCall(1, 4); ! ! *minPage = (int)m_wxlState.GetNumberType(-4); ! *maxPage = (int)m_wxlState.GetNumberType(-3); ! *pageFrom = (int)m_wxlState.GetNumberType(-2); ! *pageTo = (int)m_wxlState.GetNumberType(-1); m_wxlState.lua_SetTop(nOldTop); --- 60,70 ---- m_wxlState.wxluaT_PushUserDataType(this, wxluatype_wxLuaPrintout, true); ! if (m_wxlState.LuaPCall(1, 4) == 0) ! { ! *minPage = (int)m_wxlState.GetNumberType(-4); ! *maxPage = (int)m_wxlState.GetNumberType(-3); ! *pageFrom = (int)m_wxlState.GetNumberType(-2); ! *pageTo = (int)m_wxlState.GetNumberType(-1); ! } m_wxlState.lua_SetTop(nOldTop); *************** *** 91,96 **** m_wxlState.lua_PushNumber(pageNum); ! m_wxlState.LuaPCall(2, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 92,98 ---- m_wxlState.lua_PushNumber(pageNum); ! if (m_wxlState.LuaPCall(2, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 141,146 **** m_wxlState.lua_PushNumber(endPage); ! m_wxlState.LuaPCall(3, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); //wxPrintf(wxT("wxLuaPrintout::OnBeginDocument 2 call base %d\n"), m_wxlState.GetCallBaseClassFunction()); --- 143,149 ---- m_wxlState.lua_PushNumber(endPage); ! if (m_wxlState.LuaPCall(3, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); //wxPrintf(wxT("wxLuaPrintout::OnBeginDocument 2 call base %d\n"), m_wxlState.GetCallBaseClassFunction()); *************** *** 235,240 **** m_wxlState.lua_PushNumber(pageNum); ! m_wxlState.LuaPCall(2, 1); ! fResult = m_wxlState.GetBooleanType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 238,244 ---- m_wxlState.lua_PushNumber(pageNum); ! if (m_wxlState.LuaPCall(2, 1) == 0) ! fResult = m_wxlState.GetBooleanType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 257,262 **** m_wxlState.lua_PushString(val); ! m_wxlState.LuaPCall(2, 1); ! result = m_wxlState.GetwxStringType(-1); m_wxlState.lua_SetTop(nOldTop); } --- 261,267 ---- m_wxlState.lua_PushString(val); ! if (m_wxlState.LuaPCall(2, 1) == 0) ! result = m_wxlState.GetwxStringType(-1); ! m_wxlState.lua_SetTop(nOldTop); } *************** *** 295,302 **** m_wxlState.lua_PushString(client); ! m_wxlState.LuaPCall(2, 1); ! ! wxSize *s = (wxSize*)m_wxlState.GetUserDataType(-1, wxluatype_wxSize); ! if (s) size = *s; m_wxlState.lua_SetTop(nOldTop); --- 300,308 ---- m_wxlState.lua_PushString(client); ! if (m_wxlState.LuaPCall(2, 1) == 0) ! { ! wxSize *s = (wxSize*)m_wxlState.GetUserDataType(-1, wxluatype_wxSize); ! if (s) size = *s; ! } m_wxlState.lua_SetTop(nOldTop); *************** *** 328,335 **** m_wxlState.wxluaT_PushUserDataType(s, wxluatype_wxSize, true); ! m_wxlState.LuaPCall(4, 1); ! ! wxBitmap *b = (wxBitmap*)m_wxlState.GetUserDataType(-1, wxluatype_wxBitmap); ! if (b) bitmap = *b; m_wxlState.lua_SetTop(nOldTop); --- 334,342 ---- m_wxlState.wxluaT_PushUserDataType(s, wxluatype_wxSize, true); ! if (m_wxlState.LuaPCall(4, 1) == 0) ! { ! wxBitmap *b = (wxBitmap*)m_wxlState.GetUserDataType(-1, wxluatype_wxBitmap); ! if (b) bitmap = *b; ! } m_wxlState.lua_SetTop(nOldTop); Index: wxhtml_wxlhtml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxhtml_wxlhtml.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxhtml_wxlhtml.cpp 23 Jan 2008 06:43:38 -0000 1.2 --- wxhtml_wxlhtml.cpp 2 Dec 2008 05:20:03 -0000 1.3 *************** *** 66,71 **** m_wxlState.wxluaT_PushUserDataType((void *) &event, wxluatype_wxMouseEvent, true); ! m_wxlState.LuaPCall(5, 1); ! fResult = (lua_tonumber(L, -1) != 0); lua_settop(L, nOldTop); --- 66,72 ---- m_wxlState.wxluaT_PushUserDataType((void *) &event, wxluatype_wxMouseEvent, true); ! if (m_wxlState.LuaPCall(5, 1) == 0) ! fResult = (lua_tonumber(L, -1) != 0); ! lua_settop(L, nOldTop); |
From: John L. <jr...@us...> - 2008-10-31 05:25:22
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11491/wxLua/modules/wxbind/src Modified Files: wxcore_geometry.cpp Log Message: Add op_deref() for dereferencing a pointer to an object, i.e. *ptr == obj. Index: wxcore_geometry.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_geometry.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** wxcore_geometry.cpp 29 Oct 2008 04:44:33 -0000 1.13 --- wxcore_geometry.cpp 31 Oct 2008 05:25:08 -0000 1.14 *************** *** 340,343 **** --- 340,364 ---- } + static wxLuaArgType s_wxluatypeArray_wxLua_wxPoint2DInt_op_mul[] = { &wxluatype_wxPoint2DInt, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxPoint2DInt_op_mul(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxPoint2DInt_op_mul[1] = {{ wxLua_wxPoint2DInt_op_mul, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxPoint2DInt_op_mul }}; + // %operator wxPoint2DInt operator*(wxInt32 n) + static int LUACALL wxLua_wxPoint2DInt_op_mul(lua_State *L) + { + // wxInt32 n + wxInt32 n = (wxInt32)wxlua_getnumbertype(L, 2); + // get this + wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); + // call op_mul + // allocate a new object using the copy constructor + wxPoint2DInt* returns = new wxPoint2DInt((*self)*(n)); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxPoint2DInt((wxPoint2DInt*)returns)); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); + + return 1; + } + static wxLuaArgType s_wxluatypeArray_wxLua_wxPoint2DInt_op_neg[] = { &wxluatype_wxPoint2DInt, NULL }; static int LUACALL wxLua_wxPoint2DInt_op_neg(lua_State *L); *************** *** 483,486 **** --- 504,508 ---- { "op_imul", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPoint2DInt_op_imul, 1, NULL }, { "op_isub", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPoint2DInt_op_isub, 1, NULL }, + { "op_mul", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPoint2DInt_op_mul, 1, NULL }, { "op_neg", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPoint2DInt_op_neg, 1, NULL }, { "op_set", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPoint2DInt_op_set, 1, NULL }, |
From: John L. <jr...@us...> - 2008-10-31 05:25:21
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11491/wxLua/bindings Modified Files: genwxbind.lua Log Message: Add op_deref() for dereferencing a pointer to an object, i.e. *ptr == obj. Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.175 retrieving revision 1.176 diff -C2 -d -r1.175 -r1.176 *** genwxbind.lua 30 Oct 2008 04:14:25 -0000 1.175 --- genwxbind.lua 31 Oct 2008 05:25:08 -0000 1.176 *************** *** 109,113 **** -- --------------------------------------------------------------------------- ! -- Sort the table and return it as an numerically indexed table array -- --------------------------------------------------------------------------- function TableSort(atable, comp_func) --- 109,113 ---- -- --------------------------------------------------------------------------- ! -- Sort the table keys and return it as an numerically indexed table array -- --------------------------------------------------------------------------- function TableSort(atable, comp_func) *************** *** 257,267 **** -- win32 data types ! AllocDataType("HANDLE", "number", false) ! AllocDataType("DWORD64", "number", true) ! AllocDataType("DWORD", "number", true) ! AllocDataType("PVOID", "number", true) ! AllocDataType("LPCVOID", "number", true) ! AllocDataType("LPVOID", "number", true) ! AllocDataType("LPDWORD", "number", true) -- "fake" data types that we handle in some more complicated way --- 257,267 ---- -- win32 data types ! --AllocDataType("HANDLE", "number", false) ! --AllocDataType("DWORD64", "number", true) ! --AllocDataType("DWORD", "number", true) ! --AllocDataType("PVOID", "number", true) ! --AllocDataType("LPCVOID", "number", true) ! --AllocDataType("LPVOID", "number", true) ! --AllocDataType("LPDWORD", "number", true) -- "fake" data types that we handle in some more complicated way *************** *** 270,274 **** AllocDataType("wxString", "special", true) --AllocDataType("wxArrayString", "special", true) -- special, but we only convert input, not output ! --AllocDataType("wxSortedArrayString", "special", true) -- special, but we only convert input, not output --AllocDataType("wxArrayInt", "special", true) -- special, but we only convert input, not output AllocDataType("IntArray_FromLuaTable", "special", true) --- 270,274 ---- AllocDataType("wxString", "special", true) --AllocDataType("wxArrayString", "special", true) -- special, but we only convert input, not output ! --AllocDataType("wxSortedArrayString", "special", true) -- special, but we only convert input, not output --AllocDataType("wxArrayInt", "special", true) -- special, but we only convert input, not output AllocDataType("IntArray_FromLuaTable", "special", true) *************** *** 286,289 **** --- 286,290 ---- functionAttribTable["virtual"] = true functionAttribTable["inline"] = true + functionAttribTable["friend"] = true end *************** *** 521,525 **** -- --------------------------------------------------------------------------- function FileDataIsStringData(filename, strData) ! local file_handle = io.open(filename) if not file_handle then return false end -- ok if it doesn't exist --- 522,526 ---- -- --------------------------------------------------------------------------- function FileDataIsStringData(filename, strData) ! local file_handle = io.open(filename, "rb") if not file_handle then return false end -- ok if it doesn't exist *************** *** 576,580 **** local n = 1 for v in string.gmatch(condition, "%d+") do ! ver[n] = tonumber(v); n = n + 1 end assert(#ver == 3, "%wxchkver_x_y_z conditions has too many version numbers. '"..condition.."'") --- 577,582 ---- local n = 1 for v in string.gmatch(condition, "%d+") do ! ver[n] = tonumber(v); ! n = n + 1 end assert(#ver == 3, "%wxchkver_x_y_z conditions has too many version numbers. '"..condition.."'") *************** *** 1129,1134 **** bindingOperatorTable["+"] = "op_add" ! bindingOperatorTable["-"] = "op_sub" -- also op_neg if unary - ! bindingOperatorTable["*"] = "op_mul" bindingOperatorTable["/"] = "op_div" bindingOperatorTable["%"] = "op_mod" --- 1131,1136 ---- bindingOperatorTable["+"] = "op_add" ! bindingOperatorTable["-"] = "op_sub" -- also op_neg if unary - ! bindingOperatorTable["*"] = "op_mul" -- also op_deref if no args bindingOperatorTable["/"] = "op_div" bindingOperatorTable["%"] = "op_mod" *************** *** 3223,3226 **** --- 3225,3231 ---- member.Name = "op_predec" member.Params = {} + elseif (member["%operator"] == "*") and (#member.Params == 0) then + member.Name = "op_deref" + member.Params = {} end |
From: John L. <jr...@us...> - 2008-10-31 05:25:20
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11491/wxLua/bindings/wxwidgets Modified Files: wx_datatypes.lua wxcore_geometry.i Log Message: Add op_deref() for dereferencing a pointer to an object, i.e. *ptr == obj. Index: wxcore_geometry.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_geometry.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxcore_geometry.i 22 Oct 2008 05:31:45 -0000 1.2 --- wxcore_geometry.i 31 Oct 2008 05:25:08 -0000 1.3 *************** *** 63,66 **** --- 63,69 ---- %operator bool operator==(const wxPoint2DInt& pt) const //bool operator!=(const wxPoint2DInt& pt) const + + %operator wxPoint2DInt operator*(wxInt32 n) + %endclass Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** wx_datatypes.lua 22 Oct 2008 05:31:45 -0000 1.95 --- wx_datatypes.lua 31 Oct 2008 05:25:08 -0000 1.96 *************** *** 33,51 **** ValueType = "number", }, - DWORD = { - IsNumber = true, - Name = "DWORD", - ValueType = "number", - }, - DWORD64 = { - IsNumber = true, - Name = "DWORD64", - ValueType = "number", - }, - HANDLE = { - IsNumber = false, - Name = "HANDLE", - ValueType = "number", - }, IntArray_FromLuaTable = { IsNumber = true, --- 33,36 ---- *************** *** 53,71 **** ValueType = "special", }, - LPCVOID = { - IsNumber = true, - Name = "LPCVOID", - ValueType = "number", - }, - LPDWORD = { - IsNumber = true, - Name = "LPDWORD", - ValueType = "number", - }, - LPVOID = { - IsNumber = true, - Name = "LPVOID", - ValueType = "number", - }, LuaFunction = { IsNumber = true, --- 38,41 ---- *************** *** 78,86 **** ValueType = "special", }, - PVOID = { - IsNumber = true, - Name = "PVOID", - ValueType = "number", - }, Propagation_state = { IsNumber = true, --- 48,51 ---- |
From: John L. <jr...@us...> - 2008-10-30 04:14:38
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31959/wxLua/modules/wxbind/src Modified Files: wxcore_gdi.cpp wxcore_image.cpp Log Message: Add op_preinc and op_predec for ++/--obj. Make op_inc/dec be for the post inc/dec operator; obj++/-- Index: wxcore_gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_gdi.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxcore_gdi.cpp 29 Oct 2008 04:44:33 -0000 1.19 --- wxcore_gdi.cpp 30 Oct 2008 04:14:25 -0000 1.20 *************** *** 12607,12611 **** wxArrayVideoModes * self = (wxArrayVideoModes *)wxluaT_getuserdatatype(L, 1, wxluatype_wxArrayVideoModes); // call op_index ! wxVideoMode* returns = &(*self)[(nIndex)]; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxVideoMode); --- 12607,12611 ---- wxArrayVideoModes * self = (wxArrayVideoModes *)wxluaT_getuserdatatype(L, 1, wxluatype_wxArrayVideoModes); // call op_index ! wxVideoMode* returns = &((*self)[(nIndex)]); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxVideoMode); Index: wxcore_image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_image.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxcore_image.cpp 29 Oct 2008 04:44:33 -0000 1.16 --- wxcore_image.cpp 30 Oct 2008 04:14:25 -0000 1.17 *************** *** 2294,2298 **** wxImageHistogram::iterator * self = (wxImageHistogram::iterator *)wxluaT_getuserdatatype(L, 1, wxluatype_wxImageHistogram_iterator); // call op_inc ! wxImageHistogram::iterator* returns = &++(*self); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxImageHistogram_iterator); --- 2294,2298 ---- wxImageHistogram::iterator * self = (wxImageHistogram::iterator *)wxluaT_getuserdatatype(L, 1, wxluatype_wxImageHistogram_iterator); // call op_inc ! wxImageHistogram::iterator* returns = &((*self)++); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxImageHistogram_iterator); |
From: John L. <jr...@us...> - 2008-10-30 04:14:32
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31959/wxLua/bindings Modified Files: genwxbind.lua Log Message: Add op_preinc and op_predec for ++/--obj. Make op_inc/dec be for the post inc/dec operator; obj++/-- Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.174 retrieving revision 1.175 diff -C2 -d -r1.174 -r1.175 *** genwxbind.lua 29 Oct 2008 04:44:32 -0000 1.174 --- genwxbind.lua 30 Oct 2008 04:14:25 -0000 1.175 *************** *** 1123,1128 **** bindingOperatorTable["[]"] = "op_index" ! bindingOperatorTable["++"] = "op_inc" ! bindingOperatorTable["--"] = "op_dec" bindingOperatorTable["~"] = "op_comp" -- bitwise one's compliment --bindingOperatorTable["-"] = "op_neg" -- also op_sub if not unary - --- 1123,1128 ---- bindingOperatorTable["[]"] = "op_index" ! bindingOperatorTable["++"] = "op_inc" -- or op_preinc ! bindingOperatorTable["--"] = "op_dec" -- or op_predec bindingOperatorTable["~"] = "op_comp" -- bitwise one's compliment --bindingOperatorTable["-"] = "op_neg" -- also op_sub if not unary - *************** *** 3216,3219 **** --- 3216,3228 ---- local arg = 0 + + if (member["%operator"] == "++") and (#member.Params > 0) then + member.Name = "op_preinc" + member.Params = {} + elseif (member["%operator"] == "--") and (#member.Params > 0) then + member.Name = "op_predec" + member.Params = {} + end + while member.Params[arg+1] do arg = arg + 1 *************** *** 3755,3759 **** if member["%operator"] then ! if member["%operator"] == "[]" then -- op_index functor = "(*self)[" elseif member["%operator"] == "()" then -- op_func --- 3764,3772 ---- if member["%operator"] then ! if (member.Name == "op_preinc") or (member.Name == "op_predec") then ! functor = member["%operator"].."(*self)" ! elseif (member.Name == "op_inc") or (member.Name == "op_dec") then ! functor = "(*self)"..member["%operator"] ! elseif member["%operator"] == "[]" then -- op_index functor = "(*self)[" elseif member["%operator"] == "()" then -- op_func *************** *** 3802,3806 **** elseif member["%operator"] and string.find(origMemberPtr or "", "&", 1, 1) and (string.find(member["%operator"], "=", 1, 1) == nil) then if string.find(memberTypeWithAttrib or "", "*", 1, 1) then ! table.insert(codeList, " "..memberTypeWithAttrib.." returns = &"..functor..";\n") else table.insert(codeList, " "..memberTypeWithAttrib.." returns = "..functor..";\n") --- 3815,3819 ---- elseif member["%operator"] and string.find(origMemberPtr or "", "&", 1, 1) and (string.find(member["%operator"], "=", 1, 1) == nil) then if string.find(memberTypeWithAttrib or "", "*", 1, 1) then ! table.insert(codeList, " "..memberTypeWithAttrib.." returns = &("..functor..");\n") else table.insert(codeList, " "..memberTypeWithAttrib.." returns = "..functor..";\n") |
From: John L. <jr...@us...> - 2008-10-29 04:44:46
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1748/wxLua/bindings Modified Files: genwxbind.lua Log Message: Fix [] operator for returning a reference & to a class. Simplify code for operators that return a reference to the self. (=, +=, -=, etc) Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.173 retrieving revision 1.174 diff -C2 -d -r1.173 -r1.174 *** genwxbind.lua 27 Oct 2008 02:27:19 -0000 1.173 --- genwxbind.lua 29 Oct 2008 04:44:32 -0000 1.174 *************** *** 3797,3803 **** else -- call function, get return value ! if member["%operator"] and origMemberPtr and string.find(origMemberPtr, "&", 1, 1) then table.insert(codeList, " "..memberTypeWithAttrib.." returns = self;\n") ! table.insert(codeList, " *returns = ("..functor..");\n") elseif (not numeric) and (not memberPtr) then CommentBindingTable(codeList, " // allocate a new object using the copy constructor\n") --- 3797,3809 ---- else -- call function, get return value ! if member["%operator"] and string.find(origMemberPtr or "", "&", 1, 1) and string.find(member["%operator"], "=", 1, 1) then ! table.insert(codeList, " "..functor..";\n") table.insert(codeList, " "..memberTypeWithAttrib.." returns = self;\n") ! elseif member["%operator"] and string.find(origMemberPtr or "", "&", 1, 1) and (string.find(member["%operator"], "=", 1, 1) == nil) then ! if string.find(memberTypeWithAttrib or "", "*", 1, 1) then ! table.insert(codeList, " "..memberTypeWithAttrib.." returns = &"..functor..";\n") ! else ! table.insert(codeList, " "..memberTypeWithAttrib.." returns = "..functor..";\n") ! end elseif (not numeric) and (not memberPtr) then CommentBindingTable(codeList, " // allocate a new object using the copy constructor\n") |
From: John L. <jr...@us...> - 2008-10-29 04:44:44
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1748/wxLua/bindings/wxwidgets Modified Files: wxbase_data.i wxcore_gdi.i Log Message: Fix [] operator for returning a reference & to a class. Simplify code for operators that return a reference to the self. (=, +=, -=, etc) Index: wxcore_gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_gdi.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxcore_gdi.i 24 Oct 2008 04:40:12 -0000 1.6 --- wxcore_gdi.i 29 Oct 2008 04:44:33 -0000 1.7 *************** *** 1494,1497 **** --- 1494,1500 ---- void RemoveAt(size_t nIndex, size_t count = 1) void Shrink() + + %operator wxVideoMode& operator[](size_t nIndex) + %endclass Index: wxbase_data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxbase_data.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxbase_data.i 18 Dec 2007 01:03:32 -0000 1.2 --- wxbase_data.i 29 Oct 2008 04:44:33 -0000 1.3 *************** *** 281,284 **** --- 281,287 ---- void RemoveAt(size_t index) void Shrink() + + %operator int operator[](size_t nIndex) + %endclass *************** *** 317,320 **** --- 320,326 ---- void Shrink() void Sort(bool reverseOrder = false) + + %operator wxString& operator[](size_t nIndex) + %endclass |
From: John L. <jr...@us...> - 2008-10-29 04:44:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1748/wxLua/modules/wxbind/src Modified Files: wxadv_bind.cpp wxaui_bind.cpp wxbase_data.cpp wxbase_file.cpp wxcore_controls.cpp wxcore_gdi.cpp wxcore_geometry.cpp wxcore_image.cpp wxnet_bind.cpp Log Message: Fix [] operator for returning a reference & to a class. Simplify code for operators that return a reference to the self. (=, +=, -=, etc) Index: wxnet_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxnet_bind.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxnet_bind.cpp 29 Jan 2008 04:22:54 -0000 1.10 --- wxnet_bind.cpp 29 Oct 2008 04:44:33 -0000 1.11 *************** *** 2407,2412 **** wxURI * self = (wxURI *)wxluaT_getuserdatatype(L, 1, wxluatype_wxURI); // call op_set wxURI* returns = self; - *returns = ((*self)=(*uri)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxURI); --- 2407,2412 ---- wxURI * self = (wxURI *)wxluaT_getuserdatatype(L, 1, wxluatype_wxURI); // call op_set + (*self)=(*uri); wxURI* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxURI); Index: wxaui_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxaui_bind.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxaui_bind.cpp 29 Jan 2008 04:22:51 -0000 1.12 --- wxaui_bind.cpp 29 Oct 2008 04:44:33 -0000 1.13 *************** *** 5227,5232 **** wxAuiPaneInfo * self = (wxAuiPaneInfo *)wxluaT_getuserdatatype(L, 1, wxluatype_wxAuiPaneInfo); // call op_set wxAuiPaneInfo* returns = self; - *returns = ((*self)=(*c)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfo); --- 5227,5232 ---- wxAuiPaneInfo * self = (wxAuiPaneInfo *)wxluaT_getuserdatatype(L, 1, wxluatype_wxAuiPaneInfo); // call op_set + (*self)=(*c); wxAuiPaneInfo* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfo); *************** *** 7220,7225 **** wxAuiDockInfo * self = (wxAuiDockInfo *)wxluaT_getuserdatatype(L, 1, wxluatype_wxAuiDockInfo); // call op_set wxAuiDockInfo* returns = self; - *returns = ((*self)=(*c)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDockInfo); --- 7220,7225 ---- wxAuiDockInfo * self = (wxAuiDockInfo *)wxluaT_getuserdatatype(L, 1, wxluatype_wxAuiDockInfo); // call op_set + (*self)=(*c); wxAuiDockInfo* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDockInfo); Index: wxbase_file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxbase_file.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxbase_file.cpp 1 Apr 2008 04:19:42 -0000 1.14 --- wxbase_file.cpp 29 Oct 2008 04:44:33 -0000 1.15 *************** *** 2157,2162 **** wxFileName * self = (wxFileName *)wxluaT_getuserdatatype(L, 1, wxluatype_wxFileName); // call op_set wxFileName* returns = self; - *returns = ((*self)=(*filename)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxFileName); --- 2157,2162 ---- wxFileName * self = (wxFileName *)wxluaT_getuserdatatype(L, 1, wxluatype_wxFileName); // call op_set + (*self)=(*filename); wxFileName* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxFileName); Index: wxcore_geometry.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_geometry.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxcore_geometry.cpp 22 Oct 2008 05:31:45 -0000 1.12 --- wxcore_geometry.cpp 29 Oct 2008 04:44:33 -0000 1.13 *************** *** 275,280 **** wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_iadd wxPoint2DInt* returns = self; - *returns = ((*self)+=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); --- 275,280 ---- wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_iadd + (*self)+=(*pt); wxPoint2DInt* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); *************** *** 294,299 **** wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_idiv wxPoint2DInt* returns = self; - *returns = ((*self)/=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); --- 294,299 ---- wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_idiv + (*self)/=(*pt); wxPoint2DInt* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); *************** *** 313,318 **** wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_imul wxPoint2DInt* returns = self; - *returns = ((*self)*=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); --- 313,318 ---- wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_imul + (*self)*=(*pt); wxPoint2DInt* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); *************** *** 332,337 **** wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_isub wxPoint2DInt* returns = self; - *returns = ((*self)-=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); --- 332,337 ---- wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_isub + (*self)-=(*pt); wxPoint2DInt* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); *************** *** 370,375 **** wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_set wxPoint2DInt* returns = self; - *returns = ((*self)=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); --- 370,375 ---- wxPoint2DInt * self = (wxPoint2DInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DInt); // call op_set + (*self)=(*pt); wxPoint2DInt* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DInt); *************** *** 732,737 **** wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_iadd wxPoint2DDouble* returns = self; - *returns = ((*self)+=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); --- 732,737 ---- wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_iadd + (*self)+=(*pt); wxPoint2DDouble* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); *************** *** 751,756 **** wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_idiv wxPoint2DDouble* returns = self; - *returns = ((*self)/=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); --- 751,756 ---- wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_idiv + (*self)/=(*pt); wxPoint2DDouble* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); *************** *** 770,775 **** wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_imul wxPoint2DDouble* returns = self; - *returns = ((*self)*=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); --- 770,775 ---- wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_imul + (*self)*=(*pt); wxPoint2DDouble* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); *************** *** 789,794 **** wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_isub wxPoint2DDouble* returns = self; - *returns = ((*self)-=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); --- 789,794 ---- wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_isub + (*self)-=(*pt); wxPoint2DDouble* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); *************** *** 827,832 **** wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_set wxPoint2DDouble* returns = self; - *returns = ((*self)=(*pt)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); --- 827,832 ---- wxPoint2DDouble * self = (wxPoint2DDouble *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint2DDouble); // call op_set + (*self)=(*pt); wxPoint2DDouble* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint2DDouble); Index: wxadv_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxadv_bind.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxadv_bind.cpp 17 Mar 2008 03:05:02 -0000 1.14 --- wxadv_bind.cpp 29 Oct 2008 04:44:33 -0000 1.15 *************** *** 10116,10121 **** wxGridCellCoords * self = (wxGridCellCoords *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoords); // call op_set wxGridCellCoords* returns = self; - *returns = ((*self)=(*other)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxGridCellCoords); --- 10116,10121 ---- wxGridCellCoords * self = (wxGridCellCoords *)wxluaT_getuserdatatype(L, 1, wxluatype_wxGridCellCoords); // call op_set + (*self)=(*other); wxGridCellCoords* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxGridCellCoords); Index: wxcore_controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_controls.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxcore_controls.cpp 26 Mar 2008 05:01:31 -0000 1.15 --- wxcore_controls.cpp 29 Oct 2008 04:44:33 -0000 1.16 *************** *** 10954,10959 **** wxTreeItemId * self = (wxTreeItemId *)wxluaT_getuserdatatype(L, 1, wxluatype_wxTreeItemId); // call op_set wxTreeItemId* returns = self; - *returns = ((*self)=(*otherId)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxTreeItemId); --- 10954,10959 ---- wxTreeItemId * self = (wxTreeItemId *)wxluaT_getuserdatatype(L, 1, wxluatype_wxTreeItemId); // call op_set + (*self)=(*otherId); wxTreeItemId* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxTreeItemId); Index: wxcore_gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_gdi.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxcore_gdi.cpp 24 Oct 2008 04:40:12 -0000 1.18 --- wxcore_gdi.cpp 29 Oct 2008 04:44:33 -0000 1.19 *************** *** 204,209 **** wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_iadd wxPoint* returns = self; - *returns = ((*self)+=(*s)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); --- 204,209 ---- wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_iadd + (*self)+=(*s); wxPoint* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); *************** *** 223,228 **** wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_iadd wxPoint* returns = self; - *returns = ((*self)+=(*p)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); --- 223,228 ---- wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_iadd + (*self)+=(*p); wxPoint* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); *************** *** 242,247 **** wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_isub wxPoint* returns = self; - *returns = ((*self)-=(*s)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); --- 242,247 ---- wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_isub + (*self)-=(*s); wxPoint* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); *************** *** 261,266 **** wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_isub wxPoint* returns = self; - *returns = ((*self)-=(*p)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); --- 261,266 ---- wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_isub + (*self)-=(*p); wxPoint* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); *************** *** 317,322 **** wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_set wxPoint* returns = self; - *returns = ((*self)=(*p)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); --- 317,322 ---- wxPoint * self = (wxPoint *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPoint); // call op_set + (*self)=(*p); wxPoint* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); *************** *** 791,796 **** wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_iadd wxSize* returns = self; - *returns = ((*self)+=(*sz)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); --- 791,796 ---- wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_iadd + (*self)+=(*sz); wxSize* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); *************** *** 810,815 **** wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_idiv wxSize* returns = self; - *returns = ((*self)/=(i)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); --- 810,815 ---- wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_idiv + (*self)/=(i); wxSize* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); *************** *** 829,834 **** wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_imul wxSize* returns = self; - *returns = ((*self)*=(i)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); --- 829,834 ---- wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_imul + (*self)*=(i); wxSize* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); *************** *** 848,853 **** wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_isub wxSize* returns = self; - *returns = ((*self)-=(*sz)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); --- 848,853 ---- wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_isub + (*self)-=(*sz); wxSize* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); *************** *** 906,911 **** wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_set wxSize* returns = self; - *returns = ((*self)=(*s)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); --- 906,911 ---- wxSize * self = (wxSize *)wxluaT_getuserdatatype(L, 1, wxluatype_wxSize); // call op_set + (*self)=(*s); wxSize* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); *************** *** 1796,1801 **** wxRect * self = (wxRect *)wxluaT_getuserdatatype(L, 1, wxluatype_wxRect); // call op_iadd wxRect* returns = self; - *returns = ((*self)+=(*rect)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxRect); --- 1796,1801 ---- wxRect * self = (wxRect *)wxluaT_getuserdatatype(L, 1, wxluatype_wxRect); // call op_iadd + (*self)+=(*rect); wxRect* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxRect); *************** *** 1815,1820 **** wxRect * self = (wxRect *)wxluaT_getuserdatatype(L, 1, wxluatype_wxRect); // call op_set wxRect* returns = self; - *returns = ((*self)=(*r)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxRect); --- 1815,1820 ---- wxRect * self = (wxRect *)wxluaT_getuserdatatype(L, 1, wxluatype_wxRect); // call op_set + (*self)=(*r); wxRect* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxRect); *************** *** 2731,2736 **** wxRegion * self = (wxRegion *)wxluaT_getuserdatatype(L, 1, wxluatype_wxRegion); // call op_set wxRegion* returns = self; - *returns = ((*self)=(*r)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxRegion); --- 2731,2736 ---- wxRegion * self = (wxRegion *)wxluaT_getuserdatatype(L, 1, wxluatype_wxRegion); // call op_set + (*self)=(*r); wxRegion* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxRegion); *************** *** 3724,3729 **** wxFont * self = (wxFont *)wxluaT_getuserdatatype(L, 1, wxluatype_wxFont); // call op_set wxFont* returns = self; - *returns = ((*self)=(*f)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxFont); --- 3724,3729 ---- wxFont * self = (wxFont *)wxluaT_getuserdatatype(L, 1, wxluatype_wxFont); // call op_set + (*self)=(*f); wxFont* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxFont); *************** *** 5275,5280 **** wxColour * self = (wxColour *)wxluaT_getuserdatatype(L, 1, wxluatype_wxColour); // call op_set wxColour* returns = self; - *returns = ((*self)=(*c)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxColour); --- 5275,5280 ---- wxColour * self = (wxColour *)wxluaT_getuserdatatype(L, 1, wxluatype_wxColour); // call op_set + (*self)=(*c); wxColour* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxColour); *************** *** 5857,5862 **** wxPen * self = (wxPen *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPen); // call op_set wxPen* returns = self; - *returns = ((*self)=(*p)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPen); --- 5857,5862 ---- wxPen * self = (wxPen *)wxluaT_getuserdatatype(L, 1, wxluatype_wxPen); // call op_set + (*self)=(*p); wxPen* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPen); *************** *** 6305,6310 **** wxBrush * self = (wxBrush *)wxluaT_getuserdatatype(L, 1, wxluatype_wxBrush); // call op_set wxBrush* returns = self; - *returns = ((*self)=(*b)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxBrush); --- 6305,6310 ---- wxBrush * self = (wxBrush *)wxluaT_getuserdatatype(L, 1, wxluatype_wxBrush); // call op_set + (*self)=(*b); wxBrush* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxBrush); *************** *** 7075,7080 **** wxIcon * self = (wxIcon *)wxluaT_getuserdatatype(L, 1, wxluatype_wxIcon); // call op_set wxIcon* returns = self; - *returns = ((*self)=(*i)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxIcon); --- 7075,7080 ---- wxIcon * self = (wxIcon *)wxluaT_getuserdatatype(L, 1, wxluatype_wxIcon); // call op_set + (*self)=(*i); wxIcon* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxIcon); *************** *** 7766,7771 **** wxBitmap * self = (wxBitmap *)wxluaT_getuserdatatype(L, 1, wxluatype_wxBitmap); // call op_set wxBitmap* returns = self; - *returns = ((*self)=(*b)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); --- 7766,7771 ---- wxBitmap * self = (wxBitmap *)wxluaT_getuserdatatype(L, 1, wxluatype_wxBitmap); // call op_set + (*self)=(*b); wxBitmap* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); *************** *** 8205,8210 **** wxCursor * self = (wxCursor *)wxluaT_getuserdatatype(L, 1, wxluatype_wxCursor); // call op_set wxCursor* returns = self; - *returns = ((*self)=(*c)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxCursor); --- 8205,8210 ---- wxCursor * self = (wxCursor *)wxluaT_getuserdatatype(L, 1, wxluatype_wxCursor); // call op_set + (*self)=(*c); wxCursor* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxCursor); *************** *** 8432,8437 **** wxMask * self = (wxMask *)wxluaT_getuserdatatype(L, 1, wxluatype_wxMask); // call op_set wxMask* returns = self; - *returns = ((*self)=(*m)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxMask); --- 8432,8437 ---- wxMask * self = (wxMask *)wxluaT_getuserdatatype(L, 1, wxluatype_wxMask); // call op_set + (*self)=(*m); wxMask* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxMask); *************** *** 12596,12599 **** --- 12596,12617 ---- static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayVideoModes_delete[1] = {{ wxlua_userdata_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatypeArray_wxLua_wxArrayVideoModes_delete }}; + static wxLuaArgType s_wxluatypeArray_wxLua_wxArrayVideoModes_op_index[] = { &wxluatype_wxArrayVideoModes, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxArrayVideoModes_op_index(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayVideoModes_op_index[1] = {{ wxLua_wxArrayVideoModes_op_index, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxArrayVideoModes_op_index }}; + // %operator wxVideoMode& operator[](size_t nIndex) + static int LUACALL wxLua_wxArrayVideoModes_op_index(lua_State *L) + { + // size_t nIndex + size_t nIndex = (size_t)wxlua_getnumbertype(L, 2); + // get this + wxArrayVideoModes * self = (wxArrayVideoModes *)wxluaT_getuserdatatype(L, 1, wxluatype_wxArrayVideoModes); + // call op_index + wxVideoMode* returns = &(*self)[(nIndex)]; + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxVideoMode); + + return 1; + } + static wxLuaArgType s_wxluatypeArray_wxLua_wxArrayVideoModes_constructor1[] = { &wxluatype_wxArrayVideoModes, NULL }; static int LUACALL wxLua_wxArrayVideoModes_constructor1(lua_State *L); *************** *** 12657,12660 **** --- 12675,12679 ---- { "Shrink", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayVideoModes_Shrink, 1, NULL }, { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxArrayVideoModes_delete, 1, NULL }, + { "op_index", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayVideoModes_op_index, 1, NULL }, #if (wxLUA_USE_wxDisplay && wxUSE_DISPLAY) Index: wxbase_data.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxbase_data.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxbase_data.cpp 29 Jan 2008 04:22:51 -0000 1.16 --- wxbase_data.cpp 29 Oct 2008 04:44:33 -0000 1.17 *************** *** 1859,1862 **** --- 1859,1880 ---- static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayInt_delete[1] = {{ wxlua_userdata_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatypeArray_wxLua_wxArrayInt_delete }}; + static wxLuaArgType s_wxluatypeArray_wxLua_wxArrayInt_op_index[] = { &wxluatype_wxArrayInt, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxArrayInt_op_index(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayInt_op_index[1] = {{ wxLua_wxArrayInt_op_index, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxArrayInt_op_index }}; + // %operator int operator[](size_t nIndex) + static int LUACALL wxLua_wxArrayInt_op_index(lua_State *L) + { + // size_t nIndex + size_t nIndex = (size_t)wxlua_getnumbertype(L, 2); + // get this + wxArrayInt * self = (wxArrayInt *)wxluaT_getuserdatatype(L, 1, wxluatype_wxArrayInt); + // call op_index + int returns = ((*self)[(nIndex)]); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + static wxLuaArgType s_wxluatypeArray_wxLua_wxArrayInt_constructor1[] = { &wxluatype_wxArrayInt, NULL }; static int LUACALL wxLua_wxArrayInt_constructor1(lua_State *L); *************** *** 1922,1925 **** --- 1940,1944 ---- { "ToLuaTable", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_ToLuaTable, 1, NULL }, { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxArrayInt_delete, 1, NULL }, + { "op_index", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_op_index, 1, NULL }, #if (wxLUA_USE_wxArrayInt) *************** *** 2205,2208 **** --- 2224,2245 ---- static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayString_delete[1] = {{ wxlua_userdata_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatypeArray_wxLua_wxArrayString_delete }}; + static wxLuaArgType s_wxluatypeArray_wxLua_wxArrayString_op_index[] = { &wxluatype_wxArrayString, &wxluatype_TNUMBER, NULL }; + static int LUACALL wxLua_wxArrayString_op_index(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayString_op_index[1] = {{ wxLua_wxArrayString_op_index, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxArrayString_op_index }}; + // %operator wxString& operator[](size_t nIndex) + static int LUACALL wxLua_wxArrayString_op_index(lua_State *L) + { + // size_t nIndex + size_t nIndex = (size_t)wxlua_getnumbertype(L, 2); + // get this + wxArrayString * self = (wxArrayString *)wxluaT_getuserdatatype(L, 1, wxluatype_wxArrayString); + // call op_index + wxString returns = (*self)[(nIndex)]; + // push the result string + wxlua_pushwxString(L, returns); + + return 1; + } + static wxLuaArgType s_wxluatypeArray_wxLua_wxArrayString_constructor1[] = { &wxluatype_wxArrayString, NULL }; static int LUACALL wxLua_wxArrayString_constructor1(lua_State *L); *************** *** 2270,2273 **** --- 2307,2311 ---- { "ToLuaTable", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_ToLuaTable, 1, NULL }, { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxArrayString_delete, 1, NULL }, + { "op_index", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_op_index, 1, NULL }, #if (wxLUA_USE_wxArrayString) Index: wxcore_image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_image.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxcore_image.cpp 29 Jan 2008 04:22:53 -0000 1.15 --- wxcore_image.cpp 29 Oct 2008 04:44:33 -0000 1.16 *************** *** 1649,1654 **** wxImage * self = (wxImage *)wxluaT_getuserdatatype(L, 1, wxluatype_wxImage); // call op_set wxImage* returns = self; - *returns = ((*self)=(*image)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxImage); --- 1649,1654 ---- wxImage * self = (wxImage *)wxluaT_getuserdatatype(L, 1, wxluatype_wxImage); // call op_set + (*self)=(*image); wxImage* returns = self; // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxImage); *************** *** 2294,2299 **** wxImageHistogram::iterator * self = (wxImageHistogram::iterator *)wxluaT_getuserdatatype(L, 1, wxluatype_wxImageHistogram_iterator); // call op_inc ! wxImageHistogram::iterator* returns = self; ! *returns = (++(*self)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxImageHistogram_iterator); --- 2294,2298 ---- wxImageHistogram::iterator * self = (wxImageHistogram::iterator *)wxluaT_getuserdatatype(L, 1, wxluatype_wxImageHistogram_iterator); // call op_inc ! wxImageHistogram::iterator* returns = &++(*self); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxImageHistogram_iterator); |
From: John L. <jr...@us...> - 2008-10-27 02:27:28
|
Update of /cvsroot/wxlua/wxLua/modules/lua/doc In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25342/wxLua/modules/lua/doc Modified Files: manual.html readme.html Log Message: Update to Lua 5.1.4 Don't create a new object to copy the returned pointer from an operator, just wrap the pointer. Index: readme.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/doc/readme.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** readme.html 25 Jan 2008 23:50:50 -0000 1.4 --- readme.html 27 Oct 2008 02:27:20 -0000 1.5 *************** *** 13,17 **** </H1> ! This is the documentation included in the source distribution of Lua 5.1.3. <UL> --- 13,17 ---- </H1> ! This is the documentation included in the source distribution of Lua 5.1.4. <UL> *************** *** 34,38 **** <SMALL> Last update: ! Wed Dec 19 13:59:14 BRST 2007 </SMALL> --- 34,38 ---- <SMALL> Last update: ! Tue Aug 12 14:46:07 BRT 2008 </SMALL> Index: manual.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/doc/manual.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** manual.html 25 Jan 2008 23:50:50 -0000 1.5 --- manual.html 27 Oct 2008 02:27:19 -0000 1.6 *************** *** 4,9 **** <head> <title>Lua 5.1 Reference Manual</title> ! <link rel="stylesheet" href="lua.css"> ! <link rel="stylesheet" href="manual.css"> <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1"> </head> --- 4,9 ---- <head> <title>Lua 5.1 Reference Manual</title> ! <link rel="stylesheet" type="text/css" href="lua.css"> [...1186 lines suppressed...] For line events, *************** *** 8755,8762 **** <SMALL> Last update: ! Fri Jan 18 22:32:24 BRST 2008 </SMALL> <!-- ! Last change: revised for Lua 5.1.3 --> --- 8792,8799 ---- <SMALL> Last update: ! Mon Aug 18 13:25:46 BRT 2008 </SMALL> <!-- ! Last change: revised for Lua 5.1.4 --> |
From: John L. <jr...@us...> - 2008-10-27 02:27:28
|
Update of /cvsroot/wxlua/wxLua/modules/lua/etc In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25342/wxLua/modules/lua/etc Modified Files: lua.pc Log Message: Update to Lua 5.1.4 Don't create a new object to copy the returned pointer from an operator, just wrap the pointer. Index: lua.pc =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/etc/lua.pc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lua.pc 25 Jan 2008 23:50:50 -0000 1.4 --- lua.pc 27 Oct 2008 02:27:20 -0000 1.5 *************** *** 6,10 **** V= 5.1 # grep '^R=' ../Makefile ! R= 5.1.3 # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' --- 6,10 ---- V= 5.1 # grep '^R=' ../Makefile ! R= 5.1.4 # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' |
Update of /cvsroot/wxlua/wxLua/modules/lua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25342/wxLua/modules/lua/src Modified Files: lapi.c lbaselib.c ldebug.c loadlib.c lobject.h ltablib.c lua.h luaconf.h lundump.c Log Message: Update to Lua 5.1.4 Don't create a new object to copy the returned pointer from an operator, just wrap the pointer. Index: loadlib.c =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/loadlib.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** loadlib.c 25 Apr 2007 02:52:20 -0000 1.3 --- loadlib.c 27 Oct 2008 02:27:20 -0000 1.4 *************** *** 507,512 **** static void setfenv (lua_State *L) { lua_Debug ar; ! lua_getstack(L, 1, &ar); ! lua_getinfo(L, "f", &ar); lua_pushvalue(L, -2); lua_setfenv(L, -2); --- 507,514 ---- static void setfenv (lua_State *L) { lua_Debug ar; ! if (lua_getstack(L, 1, &ar) == 0 || ! lua_getinfo(L, "f", &ar) == 0 || /* get calling function */ ! lua_iscfunction(L, -1)) ! luaL_error(L, LUA_QL("module") " not called from a Lua function"); lua_pushvalue(L, -2); lua_setfenv(L, -2); Index: lobject.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/lobject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lobject.h 29 Mar 2006 05:48:11 -0000 1.2 --- lobject.h 27 Oct 2008 02:27:20 -0000 1.3 *************** *** 209,213 **** #define getstr(ts) cast(const char *, (ts) + 1) ! #define svalue(o) getstr(tsvalue(o)) --- 209,213 ---- #define getstr(ts) cast(const char *, (ts) + 1) ! #define svalue(o) getstr(rawtsvalue(o)) Index: lundump.c =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/lundump.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lundump.c 25 Jan 2008 23:50:51 -0000 1.3 --- lundump.c 27 Oct 2008 02:27:20 -0000 1.4 *************** *** 49,53 **** { size_t r=luaZ_read(S->Z,b,size); - UNUSED(r); IF (r!=0, "unexpected end"); } --- 49,52 ---- *************** *** 116,120 **** break; case LUA_TBOOLEAN: ! setbvalue(o,LoadChar(S)); break; case LUA_TNUMBER: --- 115,119 ---- break; case LUA_TBOOLEAN: ! setbvalue(o,LoadChar(S)!=0); break; case LUA_TNUMBER: *************** *** 162,166 **** static Proto* LoadFunction(LoadState* S, TString* p) { ! Proto* f=luaF_newproto(S->L); setptvalue2s(S->L,S->L->top,f); incr_top(S->L); f->source=LoadString(S); if (f->source==NULL) f->source=p; --- 161,167 ---- static Proto* LoadFunction(LoadState* S, TString* p) { ! Proto* f; ! if (++S->L->nCcalls > LUAI_MAXCCALLS) error(S,"code too deep"); ! f=luaF_newproto(S->L); setptvalue2s(S->L,S->L->top,f); incr_top(S->L); f->source=LoadString(S); if (f->source==NULL) f->source=p; *************** *** 176,179 **** --- 177,181 ---- IF (!luaG_checkcode(f), "bad code"); S->L->top--; + S->L->nCcalls--; return f; } Index: luaconf.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/luaconf.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** luaconf.h 18 Jan 2008 03:43:00 -0000 1.4 --- luaconf.h 27 Oct 2008 02:27:20 -0000 1.5 *************** *** 441,449 **** ** CHANGE it if you need lots of (Lua) stack space for your C ** functions. This limit is arbitrary; its only purpose is to stop C ! ** functions to consume unlimited stack space. */ ! #define LUAI_MCS_AUX ((int)(INT_MAX / (4*sizeof(LUA_NUMBER)))) ! #define LUAI_MAXCSTACK (LUAI_MCS_AUX > SHRT_MAX ? SHRT_MAX : LUAI_MCS_AUX) ! --- 441,448 ---- ** CHANGE it if you need lots of (Lua) stack space for your C ** functions. This limit is arbitrary; its only purpose is to stop C ! ** functions to consume unlimited stack space. (must be smaller than ! ** -LUA_REGISTRYINDEX) */ ! #define LUAI_MAXCSTACK 8000 *************** *** 669,673 **** #if defined(LUA_USE_POPEN) ! #define lua_popen(L,c,m) ((void)L, popen(c,m)) #define lua_pclose(L,file) ((void)L, (pclose(file) != -1)) --- 668,672 ---- #if defined(LUA_USE_POPEN) ! #define lua_popen(L,c,m) ((void)L, fflush(NULL), popen(c,m)) #define lua_pclose(L,file) ((void)L, (pclose(file) != -1)) Index: lapi.c =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/lapi.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lapi.c 18 Jan 2008 03:43:00 -0000 1.5 --- lapi.c 27 Oct 2008 02:27:20 -0000 1.6 *************** *** 94,106 **** LUA_API int lua_checkstack (lua_State *L, int size) { ! int res; lua_lock(L); ! if ((L->top - L->base + size) > LUAI_MAXCSTACK) res = 0; /* stack overflow */ ! else { luaD_checkstack(L, size); if (L->ci->top < L->top + size) L->ci->top = L->top + size; - res = 1; } lua_unlock(L); --- 94,105 ---- LUA_API int lua_checkstack (lua_State *L, int size) { ! int res = 1; lua_lock(L); ! if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK) res = 0; /* stack overflow */ ! else if (size > 0) { luaD_checkstack(L, size); if (L->ci->top < L->top + size) L->ci->top = L->top + size; } lua_unlock(L); *************** *** 931,938 **** else g->GCthreshold = 0; ! while (g->GCthreshold <= g->totalbytes) luaC_step(L); ! if (g->gcstate == GCSpause) /* end of cycle? */ ! res = 1; /* signal it */ break; } --- 930,940 ---- else g->GCthreshold = 0; ! while (g->GCthreshold <= g->totalbytes) { luaC_step(L); ! if (g->gcstate == GCSpause) { /* end of cycle? */ ! res = 1; /* signal it */ ! break; ! } ! } break; } Index: ltablib.c =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/ltablib.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ltablib.c 10 Dec 2007 05:39:05 -0000 1.2 --- ltablib.c 27 Oct 2008 02:27:20 -0000 1.3 *************** *** 133,136 **** --- 133,145 ---- + static void addfield (lua_State *L, luaL_Buffer *b, int i) { + lua_rawgeti(L, 1, i); + if (!lua_isstring(L, -1)) + luaL_error(L, "invalid value (%s) at index %d in table for " + LUA_QL("concat"), luaL_typename(L, -1), i); + luaL_addvalue(b); + } + + static int tconcat (lua_State *L) { luaL_Buffer b; *************** *** 142,152 **** last = luaL_opt(L, luaL_checkint, 4, luaL_getn(L, 1)); luaL_buffinit(L, &b); ! for (; i <= last; i++) { ! lua_rawgeti(L, 1, i); ! luaL_argcheck(L, lua_isstring(L, -1), 1, "table contains non-strings"); ! luaL_addvalue(&b); ! if (i != last) ! luaL_addlstring(&b, sep, lsep); } luaL_pushresult(&b); return 1; --- 151,160 ---- last = luaL_opt(L, luaL_checkint, 4, luaL_getn(L, 1)); luaL_buffinit(L, &b); ! for (; i < last; i++) { ! addfield(L, &b, i); ! luaL_addlstring(&b, sep, lsep); } + if (i == last) /* add last value (if interval was not empty) */ + addfield(L, &b, i); luaL_pushresult(&b); return 1; Index: lbaselib.c =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/lbaselib.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lbaselib.c 25 Jan 2008 23:50:51 -0000 1.5 --- lbaselib.c 27 Oct 2008 02:27:20 -0000 1.6 *************** *** 345,352 **** i = luaL_optint(L, 2, 1); e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1)); n = e - i + 1; /* number of elements */ ! if (n <= 0) return 0; /* empty range */ ! luaL_checkstack(L, n, "table too big to unpack"); ! for (; i<=e; i++) /* push arg[i...e] */ lua_rawgeti(L, 1, i); return n; --- 345,354 ---- i = luaL_optint(L, 2, 1); e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1)); + if (i > e) return 0; /* empty range */ n = e - i + 1; /* number of elements */ ! if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arith. overflow */ ! return luaL_error(L, "too many results to unpack"); ! lua_rawgeti(L, 1, i); /* push arg[i] (avoiding overflow problems) */ ! while (i++ < e) /* push arg[i + 1...e] */ lua_rawgeti(L, 1, i); return n; *************** *** 513,516 **** --- 515,519 ---- } + static int auxresume (lua_State *L, lua_State *co, int narg) { int status = costatus(L, co); *************** *** 526,530 **** if (status == 0 || status == LUA_YIELD) { int nres = lua_gettop(co); ! if (!lua_checkstack(L, nres)) luaL_error(L, "too many results to resume"); lua_xmove(co, L, nres); /* move yielded values */ --- 529,533 ---- if (status == 0 || status == LUA_YIELD) { int nres = lua_gettop(co); ! if (!lua_checkstack(L, nres + 1)) luaL_error(L, "too many results to resume"); lua_xmove(co, L, nres); /* move yielded values */ Index: ldebug.c =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/ldebug.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ldebug.c 26 Jun 2007 03:22:05 -0000 1.4 --- ldebug.c 27 Oct 2008 02:27:20 -0000 1.5 *************** *** 185,189 **** for (i=0; i<f->l.p->sizelineinfo; i++) setbvalue(luaH_setnum(L, t, lineinfo[i]), 1); ! sethvalue(L, L->top, t); } incr_top(L); --- 185,189 ---- for (i=0; i<f->l.p->sizelineinfo; i++) setbvalue(luaH_setnum(L, t, lineinfo[i]), 1); ! sethvalue(L, L->top, t); } incr_top(L); *************** *** 276,285 **** static int precheck (const Proto *pt) { check(pt->maxstacksize <= MAXSTACK); ! lua_assert(pt->numparams+(pt->is_vararg & VARARG_HASARG) <= pt->maxstacksize); ! lua_assert(!(pt->is_vararg & VARARG_NEEDSARG) || (pt->is_vararg & VARARG_HASARG)); check(pt->sizeupvalues <= pt->nups); check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0); ! check(GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); return 1; } --- 276,285 ---- static int precheck (const Proto *pt) { check(pt->maxstacksize <= MAXSTACK); ! check(pt->numparams+(pt->is_vararg & VARARG_HASARG) <= pt->maxstacksize); ! check(!(pt->is_vararg & VARARG_NEEDSARG) || (pt->is_vararg & VARARG_HASARG)); check(pt->sizeupvalues <= pt->nups); check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0); ! check(pt->sizecode > 0 && GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); return 1; } *************** *** 347,353 **** check(0 <= dest && dest < pt->sizecode); if (dest > 0) { ! /* cannot jump to a setlist count */ ! Instruction d = pt->code[dest-1]; ! check(!(GET_OPCODE(d) == OP_SETLIST && GETARG_C(d) == 0)); } } --- 347,362 ---- check(0 <= dest && dest < pt->sizecode); if (dest > 0) { ! int j; ! /* check that it does not jump to a setlist count; this ! is tricky, because the count from a previous setlist may ! have the same value of an invalid setlist; so, we must ! go all the way back to the first of them (if any) */ ! for (j = 0; j < dest; j++) { ! Instruction d = pt->code[dest-1-j]; ! if (!(GET_OPCODE(d) == OP_SETLIST && GETARG_C(d) == 0)) break; ! } ! /* if 'j' is even, previous value is not a setlist (even if ! it looks like one) */ ! check((j&1) == 0); } } *************** *** 364,368 **** switch (op) { case OP_LOADBOOL: { ! check(c == 0 || pc+2 < pt->sizecode); /* check its jump */ break; } --- 373,381 ---- switch (op) { case OP_LOADBOOL: { ! if (c == 1) { /* does it jump? */ ! check(pc+2 < pt->sizecode); /* check its jump */ ! check(GET_OPCODE(pt->code[pc+1]) != OP_SETLIST || ! GETARG_C(pt->code[pc+1]) != 0); ! } break; } *************** *** 429,433 **** case OP_SETLIST: { if (b > 0) checkreg(pt, a + b); ! if (c == 0) pc++; break; } --- 442,449 ---- case OP_SETLIST: { if (b > 0) checkreg(pt, a + b); ! if (c == 0) { ! pc++; ! check(pc < pt->sizecode - 1); ! } break; } *************** *** 439,447 **** for (j = 1; j <= nup; j++) { OpCode op1 = GET_OPCODE(pt->code[pc + j]); ! check(op1 == OP_GETUPVAL || op1 == OP_MOVE); ! } if (reg != NO_REG) /* tracing? */ pc += nup; /* do not 'execute' these pseudo-instructions */ ! break; } case OP_VARARG: { --- 455,463 ---- for (j = 1; j <= nup; j++) { OpCode op1 = GET_OPCODE(pt->code[pc + j]); ! check(op1 == OP_GETUPVAL || op1 == OP_MOVE); ! } if (reg != NO_REG) /* tracing? */ pc += nup; /* do not 'execute' these pseudo-instructions */ ! break; } case OP_VARARG: { Index: lua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/lua.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lua.h 18 Jan 2008 03:43:00 -0000 1.4 --- lua.h 27 Oct 2008 02:27:20 -0000 1.5 *************** *** 18,22 **** #define LUA_VERSION "Lua 5.1" ! #define LUA_RELEASE "Lua 5.1.3" #define LUA_VERSION_NUM 501 #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" --- 18,22 ---- #define LUA_VERSION "Lua 5.1" ! #define LUA_RELEASE "Lua 5.1.4" #define LUA_VERSION_NUM 501 #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" |
From: John L. <jr...@us...> - 2008-10-27 02:27:25
|
Update of /cvsroot/wxlua/wxLua/modules/lua In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25342/wxLua/modules/lua Modified Files: Makefile Log Message: Update to Lua 5.1.4 Don't create a new object to copy the returned pointer from an operator, just wrap the pointer. Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 25 Jan 2008 23:50:49 -0000 1.6 --- Makefile 27 Oct 2008 02:27:19 -0000 1.7 *************** *** 8,16 **** PLAT= none ! # Where to install. The installation starts in the src directory, so take care ! # if INSTALL_TOP is not an absolute path. (Man pages are installed from the ! # doc directory.) You may want to make these paths consistent with LUA_ROOT, ! # LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc). ! # INSTALL_TOP= /usr/local INSTALL_BIN= $(INSTALL_TOP)/bin --- 8,13 ---- PLAT= none ! # Where to install. The installation starts in the src and doc directories, ! # so take care if INSTALL_TOP is not an absolute path. INSTALL_TOP= /usr/local INSTALL_BIN= $(INSTALL_TOP)/bin *************** *** 18,33 **** INSTALL_LIB= $(INSTALL_TOP)/lib INSTALL_MAN= $(INSTALL_TOP)/man/man1 INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V ! # How to install. If you don't have "install" (unlikely) then get install-sh at ! # http://dev.w3.org/cvsweb/libwww/config/install-sh ! # or use cp instead. ! INSTALL_EXEC= $(INSTALL) -p -m 0755 ! INSTALL_DATA= $(INSTALL) -p -m 0644 # Utilities. ! INSTALL= install ! MKDIR= mkdir # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= --- 15,38 ---- INSTALL_LIB= $(INSTALL_TOP)/lib INSTALL_MAN= $(INSTALL_TOP)/man/man1 + # + # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with + # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc). INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V ! # How to install. If your install program does not support "-p", then you ! # may have to run ranlib on the installed liblua.a (do "make ranlib"). ! INSTALL= install -p ! INSTALL_EXEC= $(INSTALL) -m 0755 ! INSTALL_DATA= $(INSTALL) -m 0644 ! # ! # If you don't have install you can use cp instead. ! # INSTALL= cp -p ! # INSTALL_EXEC= $(INSTALL) ! # INSTALL_DATA= $(INSTALL) # Utilities. ! MKDIR= mkdir -p ! RANLIB= ranlib # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= *************** *** 44,48 **** # Lua version and release. V= 5.1 ! R= 5.1.3 all: $(PLAT) --- 49,53 ---- # Lua version and release. V= 5.1 ! R= 5.1.4 all: $(PLAT) *************** *** 55,59 **** install: dummy ! cd src && $(MKDIR) -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) --- 60,64 ---- install: dummy ! cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) *************** *** 61,64 **** --- 66,72 ---- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + ranlib: + cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB) + local: $(MAKE) install INSTALL_TOP=.. |
From: John L. <jr...@us...> - 2008-10-27 02:27:25
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25342/wxLua/bindings Modified Files: genwxbind.lua Log Message: Update to Lua 5.1.4 Don't create a new object to copy the returned pointer from an operator, just wrap the pointer. Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.172 retrieving revision 1.173 diff -C2 -d -r1.172 -r1.173 *** genwxbind.lua 25 Oct 2008 05:18:56 -0000 1.172 --- genwxbind.lua 27 Oct 2008 02:27:19 -0000 1.173 *************** *** 506,510 **** -- --------------------------------------------------------------------------- function FileExists(path) ! local file_handle = io.open(path) if not file_handle then return false --- 506,510 ---- -- --------------------------------------------------------------------------- function FileExists(path) ! local file_handle = io.open(path, "rb") if not file_handle then return false *************** *** 3755,3759 **** if member["%operator"] then - memberPtr = false if member["%operator"] == "[]" then -- op_index functor = "(*self)[" --- 3755,3758 ---- |
From: John L. <jr...@us...> - 2008-10-27 02:27:25
|
Update of /cvsroot/wxlua/wxLua/modules/lua/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25342/wxLua/modules/lua/include Modified Files: lua.h Log Message: Update to Lua 5.1.4 Don't create a new object to copy the returned pointer from an operator, just wrap the pointer. Index: lua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/include/lua.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lua.h 18 Jan 2008 03:43:00 -0000 1.5 --- lua.h 27 Oct 2008 02:27:20 -0000 1.6 *************** *** 18,22 **** #define LUA_VERSION "Lua 5.1" ! #define LUA_RELEASE "Lua 5.1.3" #define LUA_VERSION_NUM 501 #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" --- 18,22 ---- #define LUA_VERSION "Lua 5.1" ! #define LUA_RELEASE "Lua 5.1.4" #define LUA_VERSION_NUM 501 #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" |
From: John L. <jr...@us...> - 2008-10-27 02:27:25
|
Update of /cvsroot/wxlua/wxLua/docs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25342/wxLua/docs Modified Files: changelog.txt wxlua.html Log Message: Update to Lua 5.1.4 Don't create a new object to copy the returned pointer from an operator, just wrap the pointer. Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** wxlua.html 25 Oct 2008 05:18:56 -0000 1.39 --- wxlua.html 27 Oct 2008 02:27:19 -0000 1.40 *************** *** 113,120 **** newer versions of wxWidgets as well as older ones.</li> <li>Lua ! 5.1.3</li> <ul> <li>wxLua ! uses an unmodified copy of Lua 5.1.3 (with patches applied)</li> <li>Any program --- 113,120 ---- newer versions of wxWidgets as well as older ones.</li> <li>Lua ! 5.1.4</li> <ul> <li>wxLua ! uses an unmodified copy of Lua 5.1.4 (with patches applied)</li> <li>Any program *************** *** 2277,2279 **** other functions which are documented in <span style="font-style: italic;">wxLua/modules/wxlua/include/wxlstate.h</span>.</li> </ul> ! </body></html> \ No newline at end of file --- 2277,2279 ---- other functions which are documented in <span style="font-style: italic;">wxLua/modules/wxlua/include/wxlstate.h</span>.</li> </ul> ! </body></html> Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** changelog.txt 22 Oct 2008 05:31:45 -0000 1.64 --- changelog.txt 27 Oct 2008 02:27:19 -0000 1.65 *************** *** 5,8 **** --- 5,10 ---- -------------------------------------------------------------------- + - Updated Lua to 5.1.4 + * Changed the %typedef binding to work as the C/C++ typedefs work. The usage is reversed from how it was in previous versions. |
From: John L. <jr...@us...> - 2008-10-25 05:19:07
|
Update of /cvsroot/wxlua/wxLua/docs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25051/wxLua/docs Modified Files: binding.html wxlua.html Log Message: Add op_func for () and op_index for [] as %operators Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** wxlua.html 21 Oct 2008 04:23:18 -0000 1.38 --- wxlua.html 25 Oct 2008 05:18:56 -0000 1.39 *************** *** 3,8 **** <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>wxLua Documentation</title> ! <meta content="John Labenski" name="author"> ! </head> <body> <h2><u>wxLua --- 3,7 ---- <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>wxLua Documentation</title> ! <meta content="John Labenski" name="author"></head> <body> <h2><u>wxLua *************** *** 1298,1302 **** <li>"- (unary)" = "op_neg"</li> ! <li>"~ (unary)" = "op_comp"</li> <li></li> <li>"=" = op_set</li> --- 1297,1301 ---- <li>"- (unary)" = "op_neg"</li> ! <li>"~ (unary)" = "op_comp"</li><li>"[]" = "op_index"</li><li>"()" = "op_func"</li> <li></li> <li>"=" = op_set</li> Index: binding.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/binding.html,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** binding.html 22 Oct 2008 05:31:45 -0000 1.29 --- binding.html 25 Oct 2008 05:18:56 -0000 1.30 *************** *** 678,682 **** = "op_iand"</li><li>"^=" = "op_ixor"</li><li>"<<=" = "op_ilshift"</li><li>">>=" = "op_irshift"</li></ul><ul> <li>"++" = "op_inc"</li> <li>"--" ! = "op_dec"</li> <li>"- (unary)" = "op_neg"</li><li>"~ (unary)" = "op_comp"</li> </ul><ul> <li>"=" = op_set</li> <li>"+" = "op_add"</li> <li>"-" = "op_sub"<br> </li> <li>"*" --- 678,682 ---- = "op_iand"</li><li>"^=" = "op_ixor"</li><li>"<<=" = "op_ilshift"</li><li>">>=" = "op_irshift"</li></ul><ul> <li>"++" = "op_inc"</li> <li>"--" ! = "op_dec"</li> <li>"- (unary)" = "op_neg"</li><li>"~ (unary)" = "op_comp"</li><li>"[]" = "op_index"</li><li>"()" = "op_func"</li> </ul><ul> <li>"=" = op_set</li> <li>"+" = "op_add"</li> <li>"-" = "op_sub"<br> </li> <li>"*" |
From: John L. <jr...@us...> - 2008-10-25 05:19:00
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25051/wxLua/bindings Modified Files: genwxbind.lua Log Message: Add op_func for () and op_index for [] as %operators Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** genwxbind.lua 24 Oct 2008 04:40:12 -0000 1.171 --- genwxbind.lua 25 Oct 2008 05:18:56 -0000 1.172 *************** *** 1120,1124 **** bindingOperatorTable["="] = "op_set" ! bindingOperatorTable["()"] = "op_cast" bindingOperatorTable["++"] = "op_inc" --- 1120,1125 ---- bindingOperatorTable["="] = "op_set" ! bindingOperatorTable["()"] = "op_func" ! bindingOperatorTable["[]"] = "op_index" bindingOperatorTable["++"] = "op_inc" *************** *** 2393,2399 **** elseif lineState["%operator"] and string.find(tag, "operator", 1, 1) then -- eat the rest of the "operator+=(...)" symbols which may be split before ( ! if (string.sub(tag, -1) == "r") and (lineTags[t+1] == "(") and (lineTags[t+2] == ")") then tag = tag..lineTags[t+1]..lineTags[t+2] - print(tag) t = t + 2 else --- 2394,2399 ---- elseif lineState["%operator"] and string.find(tag, "operator", 1, 1) then -- eat the rest of the "operator+=(...)" symbols which may be split before ( ! if (string.sub(tag, -1) == "r") and (lineTags[t+1] == "(") and (lineTags[t+2] == ")") then -- op_func tag = tag..lineTags[t+1]..lineTags[t+2] t = t + 2 else *************** *** 3756,3763 **** if member["%operator"] then memberPtr = false ! if paramCount == 2 then ! functor = "(*self)"..member["%operator"] ! elseif (paramCount > 2) then functor = "(*self)" else functor = member["%operator"].."(*self)" --- 3756,3765 ---- if member["%operator"] then memberPtr = false ! if member["%operator"] == "[]" then -- op_index ! functor = "(*self)[" ! elseif member["%operator"] == "()" then -- op_func functor = "(*self)" + elseif paramCount > 1 then + functor = "(*self)"..member["%operator"] else functor = member["%operator"].."(*self)" *************** *** 3783,3786 **** --- 3785,3792 ---- end + if member["%operator"] == "[]" then -- op_index + functor = functor.."]" + end + CommentBindingTable(codeList, " // call "..member.Name.."\n") |
From: John L. <jr...@us...> - 2008-10-24 04:40:21
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2076/wxLua/bindings Modified Files: genwxbind.lua Log Message: Small binding generator fixes for special cases, added op_cast. Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.170 retrieving revision 1.171 diff -C2 -d -r1.170 -r1.171 *** genwxbind.lua 22 Oct 2008 05:31:45 -0000 1.170 --- genwxbind.lua 24 Oct 2008 04:40:12 -0000 1.171 *************** *** 1097,1128 **** -- operators for %operator ! bindingOperatorTable["=="] = "op_eq" ! bindingOperatorTable["!="] = "op_ne" ! bindingOperatorTable["<"] = "op_lt" ! bindingOperatorTable[">"] = "op_gt" ! bindingOperatorTable["<="] = "op_le" ! bindingOperatorTable[">="] = "op_ge" ! bindingOperatorTable["||"] = "op_lor" -- logical or ! bindingOperatorTable["&&"] = "op_land" -- logical and ! bindingOperatorTable["!"] = "op_not" ! bindingOperatorTable["|"] = "op_or" ! bindingOperatorTable["&"] = "op_and" ! bindingOperatorTable["^"] = "op_xor" bindingOperatorTable["<<"] = "op_lshift" bindingOperatorTable[">>"] = "op_rshift" ! bindingOperatorTable["|="] = "op_ior" ! bindingOperatorTable["&="] = "op_iand" ! bindingOperatorTable["^="] = "op_ixor" ! bindingOperatorTable["<<="] = "op_ilshift" ! bindingOperatorTable[">>="] = "op_irshift" bindingOperatorTable["="] = "op_set" bindingOperatorTable["++"] = "op_inc" bindingOperatorTable["--"] = "op_dec" bindingOperatorTable["~"] = "op_comp" -- bitwise one's compliment ! --bindingOperatorTable["-"] = "op_neg" -- also op_sub if not unary - bindingOperatorTable["+"] = "op_add" --- 1097,1129 ---- -- operators for %operator ! bindingOperatorTable["=="] = "op_eq" ! bindingOperatorTable["!="] = "op_ne" ! bindingOperatorTable["<"] = "op_lt" ! bindingOperatorTable[">"] = "op_gt" ! bindingOperatorTable["<="] = "op_le" ! bindingOperatorTable[">="] = "op_ge" ! bindingOperatorTable["||"] = "op_lor" -- logical or ! bindingOperatorTable["&&"] = "op_land" -- logical and ! bindingOperatorTable["!"] = "op_not" ! bindingOperatorTable["|"] = "op_or" ! bindingOperatorTable["&"] = "op_and" ! bindingOperatorTable["^"] = "op_xor" bindingOperatorTable["<<"] = "op_lshift" bindingOperatorTable[">>"] = "op_rshift" ! bindingOperatorTable["|="] = "op_ior" ! bindingOperatorTable["&="] = "op_iand" ! bindingOperatorTable["^="] = "op_ixor" ! bindingOperatorTable["<<="] = "op_ilshift" ! bindingOperatorTable[">>="] = "op_irshift" bindingOperatorTable["="] = "op_set" + bindingOperatorTable["()"] = "op_cast" bindingOperatorTable["++"] = "op_inc" bindingOperatorTable["--"] = "op_dec" bindingOperatorTable["~"] = "op_comp" -- bitwise one's compliment ! --bindingOperatorTable["-"] = "op_neg" -- also op_sub if not unary - bindingOperatorTable["+"] = "op_add" *************** *** 1635,1638 **** --- 1636,1646 ---- end + function InsertParamState(Params, ParamState) + -- don't insert func(void) parameters + if ParamState.DataType and ((ParamState.DataTypeWithAttrib ~= "void") or (#ParamState.DataTypePointer > 0)) then + table.insert(Params, ParamState) + end + end + -- --------------------------------------------------------------------------- -- Build DataType Table by adding %classes (and their bases), %structs, and %enums *************** *** 1750,1753 **** --- 1758,1762 ---- function ParseData(interfaceData) + local objectList = {} local parseState = *************** *** 2384,2390 **** elseif lineState["%operator"] and string.find(tag, "operator", 1, 1) then -- eat the rest of the "operator+=(...)" symbols which may be split before ( ! while lineTags[t+1] and (not string.find(lineTags[t+1], "(", 1, 1)) do ! tag = tag..lineTags[t+1] ! t = t + 1 end --- 2393,2405 ---- elseif lineState["%operator"] and string.find(tag, "operator", 1, 1) then -- eat the rest of the "operator+=(...)" symbols which may be split before ( ! if (string.sub(tag, -1) == "r") and (lineTags[t+1] == "(") and (lineTags[t+2] == ")") then ! tag = tag..lineTags[t+1]..lineTags[t+2] ! print(tag) ! t = t + 2 ! else ! while lineTags[t+1] and (lineTags[t+1] ~= "(") do ! tag = tag..lineTags[t+1] ! t = t + 1 ! end end *************** *** 2441,2445 **** elseif lineState.Action == "action_methodbracket" then ! if tag ~= '(' then local msg = "(Name="..tostring(lineState.Name).."; DataType="..tostring(lineState.DataType)..")" print("ERROR: Expected Method Tag '(', got Tag='"..tag.."'. "..msg.." "..LineTableErrString(lineTable)) --- 2456,2460 ---- elseif lineState.Action == "action_methodbracket" then ! if tag ~= "(" then local msg = "(Name="..tostring(lineState.Name).."; DataType="..tostring(lineState.DataType)..")" print("ERROR: Expected Method Tag '(', got Tag='"..tag.."'. "..msg.." "..LineTableErrString(lineTable)) *************** *** 2485,2489 **** elseif tag == ")" then if lineState.ParamState.DataType then ! table.insert(lineState.Params, lineState.ParamState) lineState.ParamState = AllocParam() end --- 2500,2504 ---- elseif tag == ")" then if lineState.ParamState.DataType then ! InsertParamState(lineState.Params, lineState.ParamState) lineState.ParamState = AllocParam() end *************** *** 2516,2520 **** end ! table.insert(lineState.Params, lineState.ParamState) lineState.ParamState = AllocParam() --- 2531,2535 ---- end ! InsertParamState(lineState.Params, lineState.ParamState) lineState.ParamState = AllocParam() *************** *** 2527,2534 **** end ! if lineState.ParamState.DataType then ! table.insert(lineState.Params, lineState.ParamState) ! lineState.ParamState = AllocParam() ! end lineState.Action = "action_method_body" --- 2542,2547 ---- end ! InsertParamState(lineState.Params, lineState.ParamState) ! lineState.ParamState = AllocParam() lineState.Action = "action_method_body" *************** *** 2549,2553 **** end ! table.insert(lineState.Params, lineState.ParamState) lineState.ParamState = AllocParam() --- 2562,2566 ---- end ! InsertParamState(lineState.Params, lineState.ParamState) lineState.ParamState = AllocParam() *************** *** 2555,2562 **** lineState.ActionMandatory = true elseif tag == ")" then ! if lineState.ParamState.DataType then ! table.insert(lineState.Params, lineState.ParamState) ! lineState.ParamState = AllocParam() ! end lineState.Action = "action_method_body" --- 2568,2573 ---- lineState.ActionMandatory = true elseif tag == ")" then ! InsertParamState(lineState.Params, lineState.ParamState) ! lineState.ParamState = AllocParam() lineState.Action = "action_method_body" *************** *** 3368,3371 **** --- 3379,3383 ---- argTypeWithAttrib = "wxCharBuffer" + argCast = "const char*" -- allows for "unsigned char*" else if isTranslated and (origIndirectionCount == 0) then *************** *** 3744,3749 **** if member["%operator"] then memberPtr = false ! if paramCount > 1 then functor = "(*self)"..member["%operator"] else functor = member["%operator"].."(*self)" --- 3756,3763 ---- if member["%operator"] then memberPtr = false ! if paramCount == 2 then functor = "(*self)"..member["%operator"] + elseif (paramCount > 2) then + functor = "(*self)" else functor = member["%operator"].."(*self)" *************** *** 3800,3804 **** end ! elseif (not member["%operator"]) and (memberPtr == "&") and (memberType ~= "wxString") then table.insert(codeList, " "..memberTypeWithAttrib.." returns = &"..functor..";\n") elseif (memberPtr == "*") or (memberType == "voidptr_long") then --- 3814,3818 ---- end ! elseif (not member["%operator"]) and (memberPtr == "&") and string.find(memberTypeWithAttrib, "*") and (memberType ~= "wxString") then table.insert(codeList, " "..memberTypeWithAttrib.." returns = &"..functor..";\n") elseif (memberPtr == "*") or (memberType == "voidptr_long") then |
From: John L. <jr...@us...> - 2008-10-24 04:40:20
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2076/wxLua/modules/wxbind/src Modified Files: wxcore_gdi.cpp wxstc_bind.cpp Log Message: Small binding generator fixes for special cases, added op_cast. Index: wxstc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxstc_bind.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxstc_bind.cpp 29 Jan 2008 04:22:54 -0000 1.10 --- wxstc_bind.cpp 24 Oct 2008 04:40:13 -0000 1.11 *************** *** 70,74 **** wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxStyledTextCtrl); // call AddTextRaw ! self->AddTextRaw(text); return 0; --- 70,74 ---- wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxStyledTextCtrl); // call AddTextRaw ! self->AddTextRaw((const char*)text); return 0; *************** *** 3436,3440 **** wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxStyledTextCtrl); // call InsertTextRaw ! self->InsertTextRaw(pos, text); return 0; --- 3436,3440 ---- wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxStyledTextCtrl); // call InsertTextRaw ! self->InsertTextRaw(pos, (const char*)text); return 0; Index: wxcore_gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_gdi.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxcore_gdi.cpp 29 Jan 2008 04:22:52 -0000 1.17 --- wxcore_gdi.cpp 24 Oct 2008 04:40:12 -0000 1.18 *************** *** 290,294 **** static int LUACALL wxLua_wxPoint_op_neg(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxPoint_op_neg[1] = {{ wxLua_wxPoint_op_neg, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxPoint_op_neg }}; ! // %operator wxPoint operator-() const { return wxPoint(-x, -y); } static int LUACALL wxLua_wxPoint_op_neg(lua_State *L) { --- 290,294 ---- static int LUACALL wxLua_wxPoint_op_neg(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxPoint_op_neg[1] = {{ wxLua_wxPoint_op_neg, WXLUAMETHOD_METHOD, 1, 1, s_wxluatypeArray_wxLua_wxPoint_op_neg }}; ! // %operator wxPoint operator-() const //{ return wxPoint(-x, -y); } static int LUACALL wxLua_wxPoint_op_neg(lua_State *L) { |