mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-31 06:50:06 +03:00
fix bug raised by zamez on IRC regenerated, seems to pop-up leaks in new
* parserInternals.c: fix bug raised by zamez on IRC * testapi.c: regenerated, seems to pop-up leaks in new tree functions * tree.c: added comments missing. * doc/*: regenerated Daniel
This commit is contained in:
parent
95175012ec
commit
304e78c6b4
@ -1,3 +1,10 @@
|
||||
Sun Jul 3 18:17:58 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* parserInternals.c: fix bug raised by zamez on IRC
|
||||
* testapi.c: regenerated, seems to pop-up leaks in new tree functions
|
||||
* tree.c: added comments missing.
|
||||
* doc/*: regenerated
|
||||
|
||||
Sun Jul 3 18:06:55 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* testapi.c runsuite.c runtest.c: fixing #307823 and a couple of
|
||||
|
@ -265,6 +265,8 @@ A:link, A:visited, A:active { text-decoration: underline }
|
||||
<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
|
||||
<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
|
||||
<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
|
||||
</dd><dt>moment</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
|
||||
<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
|
||||
</dd><dt>month</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
|
||||
</dd><dt>more</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a><br />
|
||||
<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
|
||||
|
@ -73,6 +73,8 @@ A:link, A:visited, A:active { text-decoration: underline }
|
||||
<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
|
||||
<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
|
||||
<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
|
||||
<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
|
||||
<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
|
||||
<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
|
||||
<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
|
||||
<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
|
||||
|
@ -243,6 +243,7 @@ A:link, A:visited, A:active { text-decoration: underline }
|
||||
<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
|
||||
</dd><dt>options</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtUseOptions">htmlCtxtUseOptions</a><br />
|
||||
<a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br />
|
||||
<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
|
||||
<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
|
||||
<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
|
||||
<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
|
||||
|
@ -138,6 +138,8 @@ A:link, A:visited, A:active { text-decoration: underline }
|
||||
<a href="html/libxml-parser.html#_xmlSAXHandlerV1">_xmlSAXHandlerV1</a><br />
|
||||
<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
|
||||
<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
|
||||
<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
|
||||
<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
|
||||
<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
|
||||
<a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
|
||||
<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
|
||||
|
@ -251,6 +251,8 @@ A:link, A:visited, A:active { text-decoration: underline }
|
||||
</dd><dt>would</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
|
||||
<a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
|
||||
<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
|
||||
</dd><dt>wrapper</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
|
||||
<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
|
||||
</dd><dt>wraps</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
|
||||
</dd><dt>write</dt><dd><a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
|
||||
<a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
|
||||
|
@ -681,9 +681,9 @@ A:link, A:visited, A:active { text-decoration: underline }
|
||||
</pre><p>Allocates and initializes a new DOM-wrapper context.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> or NULL in case of an internal errror.</td></tr></tbody></table></div><h3><a name="xmlDOMWrapReconcileNamespaces" id="xmlDOMWrapReconcileNamespaces"></a>Function: xmlDOMWrapReconcileNamespaces</h3><pre class="programlisting">int xmlDOMWrapReconcileNamespaces (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> int options)<br />
|
||||
</pre><p>Ensures that ns-references point to ns-decls hold on element-nodes. Ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml-SAX.html#attribute">attribute</a> values or element content. WARNING: This function is in a experimental state.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element-node</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if succeeded, -1 otherwise and on API/internal errors.</td></tr></tbody></table></div><h3><a name="xmlDOMWrapRemoveNode" id="xmlDOMWrapRemoveNode"></a>Function: xmlDOMWrapRemoveNode</h3><pre class="programlisting">int xmlDOMWrapRemoveNode (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int options)<br />
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>DOM wrapper context, unused at the moment</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element-node</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if succeeded, -1 otherwise and on API/internal errors.</td></tr></tbody></table></div><h3><a name="xmlDOMWrapRemoveNode" id="xmlDOMWrapRemoveNode"></a>Function: xmlDOMWrapRemoveNode</h3><pre class="programlisting">int xmlDOMWrapRemoveNode (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int options)<br />
|
||||
</pre><p>Unlinks the given node from its owner. This will substitute ns-references to node->nsDef for ns-references to doc->oldNs, thus ensuring the removed branch to be autark wrt ns-references. WARNING: This function is in a experimental state.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the doc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to be removed.</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, 1 if the node is not supported, -1 on API and internal errors.</td></tr></tbody></table></div><h3><a name="xmlDocCopyNode" id="xmlDocCopyNode"></a>Function: xmlDocCopyNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNode (const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int extended)<br />
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a DOM wrapper context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the doc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to be removed.</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>set of options, unused at the moment</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, 1 if the node is not supported, -1 on API and internal errors.</td></tr></tbody></table></div><h3><a name="xmlDocCopyNode" id="xmlDocCopyNode"></a>Function: xmlDocCopyNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNode (const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int extended)<br />
|
||||
</pre><p>Do a copy of the node to a given document.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>extended</tt></i>:</span></td><td>if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlDocCopyNodeList" id="xmlDocCopyNodeList"></a>Function: xmlDocCopyNodeList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNodeList (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
|
||||
</pre><p>Do a recursive copy of the node list.</p>
|
||||
|
@ -8742,17 +8742,17 @@ actually an xmlCharEncoding'/>
|
||||
<function name='xmlDOMWrapReconcileNamespaces' file='tree' module='tree'>
|
||||
<info>Ensures that ns-references point to ns-decls hold on element-nodes. Ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. WARNING: This function is in a experimental state.</info>
|
||||
<return type='int' info='0 if succeeded, -1 otherwise and on API/internal errors.'/>
|
||||
<arg name='ctxt' type='xmlDOMWrapCtxtPtr' info=''/>
|
||||
<arg name='ctxt' type='xmlDOMWrapCtxtPtr' info='DOM wrapper context, unused at the moment'/>
|
||||
<arg name='elem' type='xmlNodePtr' info='the element-node'/>
|
||||
<arg name='options' type='int' info='option flags'/>
|
||||
</function>
|
||||
<function name='xmlDOMWrapRemoveNode' file='tree' module='tree'>
|
||||
<info>Unlinks the given node from its owner. This will substitute ns-references to node->nsDef for ns-references to doc->oldNs, thus ensuring the removed branch to be autark wrt ns-references. WARNING: This function is in a experimental state.</info>
|
||||
<return type='int' info='0 on success, 1 if the node is not supported, -1 on API and internal errors.'/>
|
||||
<arg name='ctxt' type='xmlDOMWrapCtxtPtr' info=''/>
|
||||
<arg name='ctxt' type='xmlDOMWrapCtxtPtr' info='a DOM wrapper context'/>
|
||||
<arg name='doc' type='xmlDocPtr' info='the doc'/>
|
||||
<arg name='node' type='xmlNodePtr' info='the node to be removed.'/>
|
||||
<arg name='options' type='int' info=''/>
|
||||
<arg name='options' type='int' info='set of options, unused at the moment'/>
|
||||
</function>
|
||||
<function name='xmlDebugCheckDocument' file='debugXML' module='debugXML'>
|
||||
<cond>defined(LIBXML_DEBUG_ENABLED)</cond>
|
||||
|
@ -14327,6 +14327,8 @@
|
||||
<ref name='ignorableWhitespaceSAXFunc'/>
|
||||
<ref name='resolveEntity'/>
|
||||
<ref name='resolveEntitySAXFunc'/>
|
||||
<ref name='xmlDOMWrapReconcileNamespaces'/>
|
||||
<ref name='xmlDOMWrapRemoveNode'/>
|
||||
<ref name='xmlDocDumpFormatMemoryEnc'/>
|
||||
<ref name='xmlDocDumpMemoryEnc'/>
|
||||
<ref name='xmlKeepBlanksDefault'/>
|
||||
@ -23829,6 +23831,10 @@
|
||||
<ref name='xmlOutputMatchCallback'/>
|
||||
<ref name='xmlStructuredErrorFunc'/>
|
||||
</word>
|
||||
<word name='moment'>
|
||||
<ref name='xmlDOMWrapReconcileNamespaces'/>
|
||||
<ref name='xmlDOMWrapRemoveNode'/>
|
||||
</word>
|
||||
<word name='month'>
|
||||
<ref name='ftpListCallback'/>
|
||||
</word>
|
||||
@ -24597,6 +24603,7 @@
|
||||
<word name='options'>
|
||||
<ref name='htmlCtxtUseOptions'/>
|
||||
<ref name='xmlCtxtUseOptions'/>
|
||||
<ref name='xmlDOMWrapRemoveNode'/>
|
||||
<ref name='xmlModuleOpen'/>
|
||||
<ref name='xmlSaveToFd'/>
|
||||
<ref name='xmlSaveToFilename'/>
|
||||
@ -28212,6 +28219,8 @@
|
||||
<ref name='_xmlSAXHandlerV1'/>
|
||||
<ref name='_xmlSchema'/>
|
||||
<ref name='_xmlXPathContext'/>
|
||||
<ref name='xmlDOMWrapReconcileNamespaces'/>
|
||||
<ref name='xmlDOMWrapRemoveNode'/>
|
||||
<ref name='xmlSchemaValidateFile'/>
|
||||
<ref name='xmlShellBase'/>
|
||||
<ref name='xmlShellCat'/>
|
||||
@ -28695,6 +28704,10 @@
|
||||
<ref name='htmlAutoCloseTag'/>
|
||||
<ref name='xmlTextReaderGetRemainder'/>
|
||||
</word>
|
||||
<word name='wrapper'>
|
||||
<ref name='xmlDOMWrapReconcileNamespaces'/>
|
||||
<ref name='xmlDOMWrapRemoveNode'/>
|
||||
</word>
|
||||
<word name='wraps'>
|
||||
<ref name='xmlTextReaderByteConsumed'/>
|
||||
</word>
|
||||
|
@ -1267,9 +1267,11 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
||||
int
|
||||
xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (handler != NULL) {
|
||||
if (ctxt->input != NULL) {
|
||||
xmlSwitchInputEncoding(ctxt, ctxt->input, handler);
|
||||
ret = xmlSwitchInputEncoding(ctxt, ctxt->input, handler);
|
||||
} else {
|
||||
xmlErrInternal(ctxt, "xmlSwitchToEncoding : no input\n",
|
||||
NULL);
|
||||
@ -1281,7 +1283,7 @@ xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
|
||||
ctxt->charset = XML_CHAR_ENCODING_UTF8;
|
||||
} else
|
||||
return(-1);
|
||||
return(0);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
@ -18977,7 +18977,7 @@ test_xmlDOMWrapReconcileNamespaces(void) {
|
||||
|
||||
int mem_base;
|
||||
int ret_val;
|
||||
xmlDOMWrapCtxtPtr ctxt; /* */
|
||||
xmlDOMWrapCtxtPtr ctxt; /* DOM wrapper context, unused at the moment */
|
||||
int n_ctxt;
|
||||
xmlNodePtr elem; /* the element-node */
|
||||
int n_elem;
|
||||
@ -19023,13 +19023,13 @@ test_xmlDOMWrapRemoveNode(void) {
|
||||
|
||||
int mem_base;
|
||||
int ret_val;
|
||||
xmlDOMWrapCtxtPtr ctxt; /* */
|
||||
xmlDOMWrapCtxtPtr ctxt; /* a DOM wrapper context */
|
||||
int n_ctxt;
|
||||
xmlDocPtr doc; /* the doc */
|
||||
int n_doc;
|
||||
xmlNodePtr node; /* the node to be removed. */
|
||||
int n_node;
|
||||
int options; /* */
|
||||
int options; /* set of options, unused at the moment */
|
||||
int n_options;
|
||||
|
||||
for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
|
||||
|
4
tree.c
4
tree.c
@ -7499,9 +7499,10 @@ xmlDOMWrapNSNormAddNsMapItem2(xmlNsPtr **list, int *size, int *number,
|
||||
|
||||
/*
|
||||
* xmlDOMWrapRemoveNode:
|
||||
*
|
||||
* @ctxt: a DOM wrapper context
|
||||
* @doc: the doc
|
||||
* @node: the node to be removed.
|
||||
* @options: set of options, unused at the moment
|
||||
*
|
||||
* Unlinks the given node from its owner.
|
||||
* This will substitute ns-references to node->nsDef for
|
||||
@ -7953,6 +7954,7 @@ xmlDOMWrapNSNormAquireNormalizedNs(xmlDocPtr doc,
|
||||
|
||||
/*
|
||||
* xmlDOMWrapReconcileNamespaces:
|
||||
* @ctxt: DOM wrapper context, unused at the moment
|
||||
* @elem: the element-node
|
||||
* @options: option flags
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user