Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15269/wxLua/modules/wxluadebug/include
Modified Files:
wxldebug.h
Log Message:
Clarify that the "index" parameter really means stack_idx
Don't crash if someone calls a wxLua userdata with something other than a string in our __index function
Don't use lua_rawset(L, old_top), but -3 to make sure that everything is right and we're not hiding problems
Index: wxldebug.h
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** wxldebug.h 17 Nov 2007 00:15:07 -0000 1.41
--- wxldebug.h 28 Nov 2007 00:20:50 -0000 1.42
***************
*** 55,58 ****
--- 55,59 ----
wxString GetValueTypeString() const { return wxlua_getwxluatypename(m_itemValueType); }
+ // The lua_Debug.source value when enumerating the stack or a stack item
wxString GetSource() const { return m_itemSource; }
***************
*** 69,74 ****
wxString ToString() const
{
! return wxString::Format(wxT("Key: '%s' KeyType: '%s' Value: '%s' ValueType: '%s' Ref: %d Idx: %d Flag: %d HasSrc: %d"),
! m_itemKey.c_str(), GetKeyTypeString().c_str(), m_itemValue.c_str(), GetValueTypeString().c_str(), m_lua_ref, m_index, m_flag, (int)!m_itemSource.IsEmpty());
}
--- 70,77 ----
wxString ToString() const
{
! return wxString::Format(wxT("Key: '%s' KeyType: %d '%s' Value: '%s' ValueType: %d '%s' Ref: %d Idx: %d Flag: %d HasSrc: %d"),
! m_itemKey.c_str(), m_itemKeyType, GetKeyTypeString().c_str(),
! m_itemValue.c_str(), m_itemValueType, GetValueTypeString().c_str(),
! m_lua_ref, m_index, m_flag, (int)!m_itemSource.IsEmpty());
}
***************
*** 134,149 ****
// give a consistent feel to the display of Lua values.
! // Get the WXLUAARG_XXX type of the lua_type(L, index) and the
! // value at the index, returns the value of lua_type
! static int GetTypeValue(const wxLuaState& wxlState, int index, int* wxl_type, wxString& value);
// Write the input number as either an int, uint, or as a double
static wxString MakeNumber(double dnum);
// Convert the number to either "true" or "false" (eg !0 or 0)
static wxString MakeBoolean(int num);
! // Get a wxString description about the table at the index in the Lua stack
! static wxString GetTableInfo(const wxLuaState& wxlState, int index);
! // Get a wxString description about user data at the index in the Lua stack
// if full then try to look up the name of the user data from the bindings
! static wxString GetUserDataInfo(const wxLuaState& wxlState, int index, bool full = true);
// Make a full copy of the array and return it.
--- 137,154 ----
// give a consistent feel to the display of Lua values.
! // Get information about the item at the 'stack_idx'. Returns the lua_type(L, stack_idx),
! // fills 'wxl_type' with the WXLUAARG_XXX type and 'value' with a human readable value.
! static int GetTypeValue(const wxLuaState& wxlState, int stack_idx, int* wxl_type, wxString& value);
// Write the input number as either an int, uint, or as a double
static wxString MakeNumber(double dnum);
// Convert the number to either "true" or "false" (eg !0 or 0)
static wxString MakeBoolean(int num);
! // Get a wxString description about the table at the stack_idx in the Lua stack
! static wxString GetTableInfo(const wxLuaState& wxlState, int stack_idx);
! // Get a wxString description about user data at the stack_idx in the Lua stack
// if full then try to look up the name of the user data from the bindings
! static wxString GetUserDataInfo(const wxLuaState& wxlState, int stack_idx, bool full = true);
!
! //-------------------------------------------------------------------------
// Make a full copy of the array and return it.
***************
*** 153,157 ****
static int SortFunction(wxLuaDebugItem *elem1, wxLuaDebugItem *elem2 );
- //-------------------------------------------------------------------------
// operators
bool operator == (const wxLuaDebugData& debugData) const
--- 158,161 ----
|