Update of /cvsroot/wxlua/wxLua/modules/wxlua/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28670/wxLua/modules/wxlua/src
Modified Files:
wxlstate.cpp
Log Message:
Use wxSIGKILL to kill debuggee process since wxSIGTERM doesn't work in MSW
Made wxLuaCheckStack class work a little nicer for easier debugging in C++
Made wxluaT_insert(L, idx) not pop the value that it refs since
it may not be the one at the top of the stack.
Use wxLuaDebugData::GetTypeValue in wxLuaDebugTarget and other code
cleanup in wxLuaDebugTarget
Index: wxlstate.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v
retrieving revision 1.138
retrieving revision 1.139
diff -C2 -d -r1.138 -r1.139
*** wxlstate.cpp 28 Nov 2007 00:20:49 -0000 1.138
--- wxlstate.cpp 28 Nov 2007 22:55:00 -0000 1.139
***************
*** 254,268 ****
}
- lua_pushvalue(L, stack_idx); // push a copy of value to store to top
-
wxlua_pushkey_wxLuaReferences(L); // push name of table to get as key
lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table)
! lua_pushvalue(L, -2); // push value to store
int table_idx = luaL_ref(L, -2); // create unique integer reference
// in our refs table
! lua_pop(L, 3); // pop value, refs table, value
return table_idx;
--- 254,266 ----
}
wxlua_pushkey_wxLuaReferences(L); // push name of table to get as key
lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the refs table)
! lua_pushvalue(L, stack_idx > 0 ? stack_idx : stack_idx-1); // push value to store
int table_idx = luaL_ref(L, -2); // create unique integer reference
// in our refs table
! lua_pop(L, 1); // pop refs table
return table_idx;
***************
*** 424,429 ****
int wxluaT_newtag(lua_State* L)
{
! lua_newtable(L); // create a table for our new tag
! lua_pushvalue(L, -1); // push a copy of new table to top of the stack
int tag = wxluaT_insert(L, -1); // insert the table into the wxLuaReferences registry table
--- 422,426 ----
int wxluaT_newtag(lua_State* L)
{
! lua_newtable(L); // create a table for our new tag
int tag = wxluaT_insert(L, -1); // insert the table into the wxLuaReferences registry table
***************
*** 464,468 ****
lua_setmetatable(L, -2); // via the metatable
- lua_pushvalue(L, -1); // push a copy of main table to top of stack
int tag = wxluaT_insert(L, -1); // insert the table into the wxLuaReferences registry table
--- 461,464 ----
|