Update of /cvsroot/wxlua/wxLua/modules/wxlua/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21722/wxLua/modules/wxlua/src
Modified Files:
interp.cpp
Log Message:
Don't double up on '\' in MSW, the caller must remember to do it if they have strings containing them.
This was a hack for running scripts with DOS paths as strings.
Index: interp.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/interp.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** interp.cpp 18 Jun 2005 20:46:00 -0000 1.3
--- interp.cpp 17 Jul 2005 05:12:49 -0000 1.4
***************
*** 682,703 ****
m_user_break = FALSE;
- #ifdef __WXMSW__
- // FIXME - hack for \ getting stripped out by lua
- wxString s;
- size_t len = script.Length();
- for (size_t n = 0; n < len; n++)
- {
- s += script.GetChar(n);
- if (script.GetChar(n) == wxT('\\'))
- s += wxT("\\");
- }
- #else
- wxString s = script;
- #endif
-
- // This is simple code to run the string, it calls _ALERT function on error
m_is_running = TRUE;
! //int ret_val = luaL_loadbuffer(m_lua_State, wx2lua(s), s.Len(), wx2lua(name));
! int ret_val = lua_dostring(m_lua_State, wx2lua(s));
m_is_running = FALSE;
--- 682,688 ----
m_user_break = FALSE;
m_is_running = TRUE;
! //int ret_val = luaL_loadbuffer(m_lua_State, wx2lua(script), script.Len(), wx2lua(name));
! int ret_val = lua_dostring(m_lua_State, wx2lua(script));
m_is_running = FALSE;
|