summaryrefslogtreecommitdiff
path: root/storage/connect/libdoc.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2013-07-03 23:58:22 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2013-07-03 23:58:22 +0200
commitffedc6b8910914e3b03bea99b64fa6dd1d2ca235 (patch)
treeb25c96c7a7d8e6935556126a64f1892a8b00b2af /storage/connect/libdoc.cpp
parent59b3833c41273375a05b8a87f04a8271253da3e7 (diff)
downloadmariadb-git-ffedc6b8910914e3b03bea99b64fa6dd1d2ca235.tar.gz
- Makes memory check conditionally
modified: storage/connect/libdoc.cpp
Diffstat (limited to 'storage/connect/libdoc.cpp')
-rw-r--r--storage/connect/libdoc.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp
index 2a786ef0eef..02b931e2dc2 100644
--- a/storage/connect/libdoc.cpp
+++ b/storage/connect/libdoc.cpp
@@ -30,11 +30,11 @@ extern char version[];
extern int trace;
} // "C"
-#if defined(_DEBUG)
-static xmlFreeFunc Free;
-static xmlMallocFunc Malloc;
-static xmlMallocFunc MallocA;
-static xmlReallocFunc Realloc;
+#if defined(MEMORY_TRACE)
+static xmlFreeFunc Free;
+static xmlMallocFunc Malloc;
+static xmlMallocFunc MallocA;
+static xmlReallocFunc Realloc;
static xmlStrdupFunc Strdup;
void xmlMyFree(void *mem)
@@ -75,7 +75,7 @@ char *xmlMyStrdup(const char *str)
htrc("Duplicating to %p from %p %s\n", p, str, str);
return p;
} // end of xmlMyStrdup
-#endif // _DEBUG
+#endif // MEMORY_TRACE
/******************************************************************/
/* Return a LIBXMLDOC as a XMLDOC. */
@@ -91,17 +91,17 @@ PXDOC GetLibxmlDoc(PGLOBAL g, char *nsl, char *nsdf,
/******************************************************************/
void XmlInitParserLib(void)
{
-#if defined(_DEBUG)
+#if defined(MEMORY_TRACE)
int rc = xmlGcMemGet(&Free, &Malloc, &MallocA, &Realloc, &Strdup);
if (!rc)
- rc = xmlGcMemSetup(xmlMyFree,
- xmlMyMalloc,
- xmlMyMallocAtomic,
- xmlMyRealloc,
- xmlMyStrdup);
+ rc = xmlGcMemSetup(xmlMyFree,
+ xmlMyMalloc,
+ xmlMyMallocAtomic,
+ xmlMyRealloc,
+ xmlMyStrdup);
-#endif // _DEBUG
+#endif // MEMORY_TRACE
xmlInitParser();
} // end of XmlInitParserLib