Commit ffedc6b8 authored by Olivier Bertrand's avatar Olivier Bertrand

- Makes memory check conditionally

modified:
  storage/connect/libdoc.cpp
parent 59b3833c
...@@ -30,7 +30,7 @@ extern char version[]; ...@@ -30,7 +30,7 @@ extern char version[];
extern int trace; extern int trace;
} // "C" } // "C"
#if defined(_DEBUG) #if defined(MEMORY_TRACE)
static xmlFreeFunc Free; static xmlFreeFunc Free;
static xmlMallocFunc Malloc; static xmlMallocFunc Malloc;
static xmlMallocFunc MallocA; static xmlMallocFunc MallocA;
...@@ -75,7 +75,7 @@ char *xmlMyStrdup(const char *str) ...@@ -75,7 +75,7 @@ char *xmlMyStrdup(const char *str)
htrc("Duplicating to %p from %p %s\n", p, str, str); htrc("Duplicating to %p from %p %s\n", p, str, str);
return p; return p;
} // end of xmlMyStrdup } // end of xmlMyStrdup
#endif // _DEBUG #endif // MEMORY_TRACE
/******************************************************************/ /******************************************************************/
/* Return a LIBXMLDOC as a XMLDOC. */ /* Return a LIBXMLDOC as a XMLDOC. */
...@@ -91,7 +91,7 @@ PXDOC GetLibxmlDoc(PGLOBAL g, char *nsl, char *nsdf, ...@@ -91,7 +91,7 @@ PXDOC GetLibxmlDoc(PGLOBAL g, char *nsl, char *nsdf,
/******************************************************************/ /******************************************************************/
void XmlInitParserLib(void) void XmlInitParserLib(void)
{ {
#if defined(_DEBUG) #if defined(MEMORY_TRACE)
int rc = xmlGcMemGet(&Free, &Malloc, &MallocA, &Realloc, &Strdup); int rc = xmlGcMemGet(&Free, &Malloc, &MallocA, &Realloc, &Strdup);
if (!rc) if (!rc)
...@@ -101,7 +101,7 @@ if (!rc) ...@@ -101,7 +101,7 @@ if (!rc)
xmlMyRealloc, xmlMyRealloc,
xmlMyStrdup); xmlMyStrdup);
#endif // _DEBUG #endif // MEMORY_TRACE
xmlInitParser(); xmlInitParser();
} // end of XmlInitParserLib } // end of XmlInitParserLib
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment