[libxml2] Fix documentation parser



commit f703ed694b9b54ad13159bd352f1c16780982fcd
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Wed Aug 24 01:29:49 2022 +0200

    Fix documentation parser
    
    Reset comment right after adding to the index.

 doc/apibuild.py                  |  5 +++--
 doc/devhelp/libxml2-globals.html |  6 +++---
 doc/libxml2-api.xml              | 12 +++++++++---
 3 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/doc/apibuild.py b/doc/apibuild.py
index 2090c31b..4848b931 100755
--- a/doc/apibuild.py
+++ b/doc/apibuild.py
@@ -1117,7 +1117,6 @@ class CParser:
                 token = self.token()
                 token = self.parseBlock(token)
             elif token[0] == "sep" and token[1] == "}":
-                self.comment = None
                 token = self.token()
                 return token
             else:
@@ -1561,17 +1560,20 @@ class CParser:
                                 ((type, None), self.signature), 1)
                         self.index_add(self.name, self.filename, static,
                                         "function", d)
+                        self.comment = None
                         token = self.token()
                     elif token[0] == "sep" and token[1] == "{":
                         d = self.mergeFunctionComment(self.name,
                                 ((type, None), self.signature), static)
                         self.index_add(self.name, self.filename, static,
                                         "function", d)
+                        self.comment = None
                         token = self.token()
                         token = self.parseBlock(token);
                 elif token[1] == ',':
                     self.index_add(self.name, self.filename, static,
                                     "variable", type)
+                    self.comment = None
                     type = type_orig
                     token = self.token()
                     while token != None and token[0] == "sep":
@@ -1580,7 +1582,6 @@ class CParser:
                     if token != None and token[0] == "name":
                         self.name = token[1]
                         token = self.token()
-                    self.comment = None
                 else:
                     break
 
diff --git a/doc/devhelp/libxml2-globals.html b/doc/devhelp/libxml2-globals.html
index e65d8857..05f9c090 100644
--- a/doc/devhelp/libxml2-globals.html
+++ b/doc/devhelp/libxml2-globals.html
@@ -142,7 +142,7 @@ const char *        <a href="#xmlThrDefTreeIndentString">xmlThrDefTreeIndentString</a>
 <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span 
class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div></div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="htmlDefaultSAXHandler">Variable 
</a>htmlDefaultSAXHandler</h3><pre class="programlisting"><a 
href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> htmlDefaultSAXHandler;
-</pre><p/>
+</pre><p>DEPRECATED: This handler is unused and will be removed from future versions. Default old SAX v1 
handler for HTML, builds the DOM tree</p>
 </div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="oldXMLWDcompatibility">Variable 
</a>oldXMLWDcompatibility</h3><pre class="programlisting">int oldXMLWDcompatibility;
@@ -158,11 +158,11 @@ const char *      <a href="#xmlThrDefTreeIndentString">xmlThrDefTreeIndentString</a>
 </div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDefaultSAXHandler">Variable 
</a>xmlDefaultSAXHandler</h3><pre class="programlisting"><a 
href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> xmlDefaultSAXHandler;
-</pre><p/>
+</pre><p>DEPRECATED: This handler is unused and will be removed from future versions. Default SAX version1 
handler for XML, builds the DOM tree</p>
 </div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDefaultSAXLocator">Variable 
</a>xmlDefaultSAXLocator</h3><pre class="programlisting"><a 
href="libxml2-tree.html#xmlSAXLocator">xmlSAXLocator</a> xmlDefaultSAXLocator;
-</pre><p/>
+</pre><p>DEPRECATED: Don't use The default SAX Locator { getPublicId, getSystemId, getLineNumber, 
getColumnNumber}</p>
 </div>
         <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDeregisterNodeDefaultValue">Variable 
</a>xmlDeregisterNodeDefaultValue</h3><pre class="programlisting"><a 
href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlDeregisterNodeDefaultValue;
diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
index 8623afbc..15d0d68b 100644
--- a/doc/libxml2-api.xml
+++ b/doc/libxml2-api.xml
@@ -6951,7 +6951,9 @@ Could we use @subtypes for this?'/>
     <typedef name='xmlXPathVariablePtr' file='xpath' type='xmlXPathVariable *'/>
     <variable name='emptyExp' file='xmlregexp' type='xmlExpNodePtr'/>
     <variable name='forbiddenExp' file='xmlregexp' type='xmlExpNodePtr'/>
-    <variable name='htmlDefaultSAXHandler' file='globals' type='xmlSAXHandlerV1'/>
+    <variable name='htmlDefaultSAXHandler' file='globals' type='xmlSAXHandlerV1'>
+      <info>DEPRECATED: This handler is unused and will be removed from future versions.  Default old SAX v1 
handler for HTML, builds the DOM tree</info>
+    </variable>
     <variable name='oldXMLWDcompatibility' file='globals' type='int'>
       <info>Global setting, DEPRECATED.</info>
     </variable>
@@ -6961,8 +6963,12 @@ Could we use @subtypes for this?'/>
     <variable name='xmlDefaultBufferSize' file='globals' type='int'>
       <info>DEPRECATED: Don&apos;t use.  Global setting, default buffer size. Default value is 
BASE_BUFFER_SIZE</info>
     </variable>
-    <variable name='xmlDefaultSAXHandler' file='globals' type='xmlSAXHandlerV1'/>
-    <variable name='xmlDefaultSAXLocator' file='globals' type='xmlSAXLocator'/>
+    <variable name='xmlDefaultSAXHandler' file='globals' type='xmlSAXHandlerV1'>
+      <info>DEPRECATED: This handler is unused and will be removed from future versions.  Default SAX 
version1 handler for XML, builds the DOM tree</info>
+    </variable>
+    <variable name='xmlDefaultSAXLocator' file='globals' type='xmlSAXLocator'>
+      <info>DEPRECATED: Don&apos;t use  The default SAX Locator { getPublicId, getSystemId, getLineNumber, 
getColumnNumber}</info>
+    </variable>
     <variable name='xmlDeregisterNodeDefaultValue' file='globals' type='xmlDeregisterNodeFunc'/>
     <variable name='xmlDoValidityCheckingDefaultValue' file='globals' type='int'>
       <info>Global setting, indicate that the parser should work in validating mode. Disabled by 
default.</info>


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