X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..f0b078077d0b57e73ce754eb7d5ca2143d933cb2:/src/common/memory.cpp diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 28256329b4..ce4aec4926 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -24,7 +24,7 @@ #include "wx/defs.h" #endif -#if (DEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT +#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT #ifdef __GNUG__ // #pragma implementation @@ -51,7 +51,7 @@ #include #include -#ifdef __WINDOWS__ +#ifdef __WXMSW__ #include #ifdef GetClassInfo @@ -623,7 +623,7 @@ void wxDebugContext::TraverseList (PmSFV func, wxMemStruct *from) */ bool wxDebugContext::PrintList (void) { -#if DEBUG +#if WXDEBUG if (!HasStream()) return FALSE; @@ -637,7 +637,7 @@ bool wxDebugContext::PrintList (void) bool wxDebugContext::Dump(void) { -#if DEBUG +#if WXDEBUG if (!HasStream()) return FALSE; @@ -687,7 +687,7 @@ static wxDebugStatsStruct *InsertStatsStruct(wxDebugStatsStruct *head, wxDebugSt bool wxDebugContext::PrintStatistics(bool detailed) { -#if DEBUG +#if WXDEBUG if (!HasStream()) return FALSE; @@ -860,7 +860,7 @@ int wxDebugContext::CountObjectsLeft(void) // We'll only do malloc and free for the moment: leave the interesting // stuff for the wxObject versions. -#if DEBUG && USE_GLOBAL_MEMORY_OPERATORS +#if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS #ifdef new #undef new @@ -884,6 +884,7 @@ void * operator new (size_t size, char * fileName, int lineNum) #endif } +#if !( defined (_MSC_VER) && (_MSC_VER <= 1000) ) void * operator new[] (size_t size, char * fileName, int lineNum) { #ifdef NO_DEBUG_ALLOCATION @@ -892,6 +893,7 @@ void * operator new[] (size_t size, char * fileName, int lineNum) return wxDebugAlloc(size, fileName, lineNum, FALSE, TRUE); #endif } +#endif void operator delete (void * buf) { @@ -902,6 +904,7 @@ void operator delete (void * buf) #endif } +#if !( defined (_MSC_VER) && (_MSC_VER <= 1000) ) void operator delete[] (void * buf) { #ifdef NO_DEBUG_ALLOCATION @@ -910,6 +913,7 @@ void operator delete[] (void * buf) wxDebugFree(buf, TRUE); #endif } +#endif #endif @@ -1017,7 +1021,7 @@ void wxTrace(const char *fmt ...) va_start(ap, fmt); -#ifdef __WINDOWS__ +#ifdef __WXMSW__ wvsprintf(buffer,fmt,ap) ; #else vsprintf(buffer,fmt,ap) ; @@ -1031,7 +1035,7 @@ void wxTrace(const char *fmt ...) wxDebugContext::GetStream().flush(); } else -#ifdef __WINDOWS__ +#ifdef __WXMSW__ OutputDebugString((LPCSTR)buffer) ; #else fprintf(stderr, buffer); @@ -1049,7 +1053,7 @@ void wxTraceLevel(int level, const char *fmt ...) va_start(ap, fmt); -#ifdef __WINDOWS__ +#ifdef __WXMSW__ wvsprintf(buffer,fmt,ap) ; #else vsprintf(buffer,fmt,ap) ; @@ -1063,14 +1067,14 @@ void wxTraceLevel(int level, const char *fmt ...) wxDebugContext::GetStream().flush(); } else -#ifdef __WINDOWS__ +#ifdef __WXMSW__ OutputDebugString((LPCSTR)buffer) ; #else fprintf(stderr, buffer); #endif } -#else // USE_MEMORY_TRACING && DEBUG +#else // USE_MEMORY_TRACING && WXDEBUG void wxTrace(const char *WXUNUSED(fmt) ...) { }