DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22178>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22178 XMemory is incompatible with Visual C++ debug macros ------- Additional Comments From [EMAIL PROTECTED] 2003-08-22 07:54 ------- Hi Neil, sorry for being late. Here is the reworked patch. Alberto Index: XMemory.cpp =================================================================== RCS file: /home/cvspublic/xml-xerces/c/src/xercesc/util/XMemory.cpp,v retrieving revision 1.7 diff -u -r1.7 XMemory.cpp --- XMemory.cpp 14 Jul 2003 18:51:05 -0000 1.7 +++ XMemory.cpp 22 Aug 2003 07:46:47 -0000 @@ -83,6 +83,20 @@ return (char*)block + headerSize; } +#if defined(XML_VISUALCPP) + +void* XMemory::operator new(size_t size, const char* file, int line) +{ + return operator new(size); +} + +void XMemory::operator delete(void* p, const char* file, int line) +{ + operator delete(p); +} + +#endif + void* XMemory::operator new(size_t size, MemoryManager* manager) { assert(manager != 0); Index: XMemory.hpp =================================================================== RCS file: /home/cvspublic/xml-xerces/c/src/xercesc/util/XMemory.hpp,v retrieving revision 1.4 diff -u -r1.4 XMemory.hpp --- XMemory.hpp 14 Jul 2003 18:51:05 -0000 1.4 +++ XMemory.hpp 22 Aug 2003 07:46:47 -0000 @@ -93,6 +93,25 @@ */ void* operator new(size_t size); +#if defined(XML_VISUALCPP) + /** + * This method overrides the MFC debug version of the operator new + * + * @param size The requested memory size + * @param file The file where the allocation was requested + * @param line The line where the allocation was requested + */ + void* operator new(size_t size, const char* file, int line); + /** + * This method provide a matching delete for the MFC debug new + * + * @param p The pointer to the allocated memory + * @param file The file where the allocation was requested + * @param line The line where the allocation was requested + */ + void operator delete(void* p, const char* file, int line); +#endif + /** * This method overrides placement operator new * @@ -114,7 +133,7 @@ * This method provide a matching delete for the placement new * * @param p The pointer to the allocated memory - * @param memMgr An appliation's memory manager + * @param memMgr An application's memory manager */ void operator delete(void* p, MemoryManager* memMgr); #endif =================================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
