Fix printing 64 bit pointers in wxMemStruct code
Don't truncate addresses under Win64 when printing debug messages using wxMemStruct. This avoids build errors if wxUSE_DEBUG_CONTEXT = 1 when building on Win64. Closes https://github.com/wxWidgets/wxWidgets/pull/1249
This commit is contained in:
@@ -321,7 +321,7 @@ void wxMemStruct::PrintNode ()
|
||||
msg += wxT("object");
|
||||
|
||||
wxString msg2;
|
||||
msg2.Printf(wxT(" at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize());
|
||||
msg2.Printf(wxT(" at %#zx, size %d"), wxPtrToUInt(GetActualData()), (int)RequestSize());
|
||||
msg += msg2;
|
||||
|
||||
wxLogMessage(msg);
|
||||
@@ -334,7 +334,7 @@ void wxMemStruct::PrintNode ()
|
||||
msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum);
|
||||
msg += wxT("non-object data");
|
||||
wxString msg2;
|
||||
msg2.Printf(wxT(" at 0x%lX, size %d\n"), (long)GetActualData(), (int)RequestSize());
|
||||
msg2.Printf(wxT(" at %#zx, size %d\n"), wxPtrToUInt(GetActualData()), (int)RequestSize());
|
||||
msg += msg2;
|
||||
|
||||
wxLogMessage(msg);
|
||||
@@ -367,7 +367,7 @@ void wxMemStruct::Dump ()
|
||||
msg += wxT("unknown object class");
|
||||
|
||||
wxString msg2;
|
||||
msg2.Printf(wxT(" at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize());
|
||||
msg2.Printf(wxT(" at %#zx, size %d"), wxPtrToUInt(GetActualData()), (int)RequestSize());
|
||||
msg += msg2;
|
||||
|
||||
wxDebugContext::OutputDumpLine(msg.c_str());
|
||||
@@ -379,7 +379,7 @@ void wxMemStruct::Dump ()
|
||||
msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum);
|
||||
|
||||
wxString msg2;
|
||||
msg2.Printf(wxT("non-object data at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize() );
|
||||
msg2.Printf(wxT("non-object data at %#zx, size %d"), wxPtrToUInt(GetActualData()), (int)RequestSize() );
|
||||
msg += msg2;
|
||||
wxDebugContext::OutputDumpLine(msg.c_str());
|
||||
}
|
||||
|
Reference in New Issue
Block a user