mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Minimal changes for XSLT node-set() extra function:
- tree.c: minor doc fix - xpath.c: deallocation issues when a result tree has been converted to a node-set Daniel
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Wed Feb 28 00:43:58 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* tree.c: minor doc fix
|
||||||
|
* xpath.c: deallocation issues when a result tree has been
|
||||||
|
converted to a node-set
|
||||||
|
|
||||||
Mon Feb 26 22:09:45 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Mon Feb 26 22:09:45 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* doc/xml.html: oops corrected dates s/2000/2001
|
* doc/xml.html: oops corrected dates s/2000/2001
|
||||||
|
2
tree.c
2
tree.c
@ -3658,7 +3658,7 @@ xmlGetNsList(xmlDocPtr doc, xmlNodePtr node) {
|
|||||||
* xmlSearchNs:
|
* xmlSearchNs:
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
* @node: the current node
|
* @node: the current node
|
||||||
* @nameSpace: the namespace string
|
* @nameSpace: the namespace prefix
|
||||||
*
|
*
|
||||||
* Search a Ns registered under a given name space for a document.
|
* Search a Ns registered under a given name space for a document.
|
||||||
* recurse on the parents until it finds the defined namespace
|
* recurse on the parents until it finds the defined namespace
|
||||||
|
11
xpath.c
11
xpath.c
@ -999,6 +999,7 @@ xmlXPathNewNodeSet(xmlNodePtr val) {
|
|||||||
}
|
}
|
||||||
memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
|
memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
|
||||||
ret->type = XPATH_NODESET;
|
ret->type = XPATH_NODESET;
|
||||||
|
ret->boolval = 0;
|
||||||
ret->nodesetval = xmlXPathNodeSetCreate(val);
|
ret->nodesetval = xmlXPathNodeSetCreate(val);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
@ -1586,8 +1587,14 @@ void
|
|||||||
xmlXPathFreeObject(xmlXPathObjectPtr obj) {
|
xmlXPathFreeObject(xmlXPathObjectPtr obj) {
|
||||||
if (obj == NULL) return;
|
if (obj == NULL) return;
|
||||||
if (obj->type == XPATH_NODESET) {
|
if (obj->type == XPATH_NODESET) {
|
||||||
if (obj->nodesetval != NULL)
|
if (obj->boolval) {
|
||||||
xmlXPathFreeNodeSet(obj->nodesetval);
|
obj->type = XPATH_XSLT_TREE;
|
||||||
|
if (obj->nodesetval != NULL)
|
||||||
|
xmlXPathFreeValueTree(obj->nodesetval);
|
||||||
|
} else {
|
||||||
|
if (obj->nodesetval != NULL)
|
||||||
|
xmlXPathFreeNodeSet(obj->nodesetval);
|
||||||
|
}
|
||||||
#ifdef LIBXML_XPTR_ENABLED
|
#ifdef LIBXML_XPTR_ENABLED
|
||||||
} else if (obj->type == XPATH_LOCATIONSET) {
|
} else if (obj->type == XPATH_LOCATIONSET) {
|
||||||
if (obj->user != NULL)
|
if (obj->user != NULL)
|
||||||
|
Reference in New Issue
Block a user