hide the nbParse* variables used for debugging as pointed by Mike Hommey
* parser.c: hide the nbParse* variables used for debugging
as pointed by Mike Hommey
daniel
svn path=/trunk/; revision=3823
diff --git a/ChangeLog b/ChangeLog
index c027d58..3967a72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 25 11:21:26 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: hide the nbParse* variables used for debugging
+ as pointed by Mike Hommey
+
Wed Mar 25 10:50:05 CET 2009 Daniel Veillard <daniel@veillard.com>
* include/wsockcompat.h win32/Makefile.bcb xpath.c: fixes for
diff --git a/parser.c b/parser.c
index a4d8e61..3501b4e 100644
--- a/parser.c
+++ b/parser.c
@@ -2917,12 +2917,15 @@
* Routines to parse Name, NCName and NmToken *
* *
************************************************************************/
-unsigned long nbParseName = 0;
-unsigned long nbParseNmToken = 0;
-unsigned long nbParseNCName = 0;
-unsigned long nbParseNCNameComplex = 0;
-unsigned long nbParseNameComplex = 0;
-unsigned long nbParseStringName = 0;
+#ifdef DEBUG
+static unsigned long nbParseName = 0;
+static unsigned long nbParseNmToken = 0;
+static unsigned long nbParseNCName = 0;
+static unsigned long nbParseNCNameComplex = 0;
+static unsigned long nbParseNameComplex = 0;
+static unsigned long nbParseStringName = 0;
+#endif
+
/*
* The two following functions are related to the change of accepted
* characters for Name and NmToken in the Revision 5 of XML-1.0
@@ -3012,7 +3015,9 @@
int c;
int count = 0;
+#ifdef DEBUG
nbParseNameComplex++;
+#endif
/*
* Handler for more complex cases
@@ -3128,7 +3133,9 @@
GROW;
+#ifdef DEBUG
nbParseName++;
+#endif
/*
* Accelerator for simple ASCII names
@@ -3165,7 +3172,9 @@
int c;
int count = 0;
+#ifdef DEBUG
nbParseNCNameComplex++;
+#endif
/*
* Handler for more complex cases
@@ -3211,7 +3220,9 @@
const xmlChar *ret;
int count = 0;
+#ifdef DEBUG
nbParseNCName++;
+#endif
/*
* Accelerator for simple ASCII names
@@ -3306,7 +3317,9 @@
int len = 0, l;
int c;
+#ifdef DEBUG
nbParseStringName++;
+#endif
c = CUR_SCHAR(cur, l);
if (!xmlIsNameStartChar(ctxt, c)) {
@@ -3380,7 +3393,9 @@
int c;
int count = 0;
+#ifdef DEBUG
nbParseNmToken++;
+#endif
GROW;
c = CUR_CHAR(l);