libxml2 r3823 - trunk



Author: veillard
Date: Wed Mar 25 10:22:31 2009
New Revision: 3823
URL: http://svn.gnome.org/viewvc/libxml2?rev=3823&view=rev

Log:
* parser.c: hide the nbParse* variables used for debugging
  as pointed by Mike Hommey
daniel


Modified:
   trunk/ChangeLog
   trunk/parser.c

Modified: trunk/parser.c
==============================================================================
--- trunk/parser.c	(original)
+++ trunk/parser.c	Wed Mar 25 10:22:31 2009
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]