mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-08 21:42:07 +03:00
Explain why we have to mess with 'boolval' of value trees
This commit is contained in:
@@ -793,7 +793,11 @@ exsltFuncResultElem (xsltTransformContextPtr ctxt,
|
||||
"exsltFuncResultElem: ret == NULL\n");
|
||||
data->error = 1;
|
||||
} else {
|
||||
ret->boolval = 0; /* Freeing is not handled there anymore */
|
||||
/*
|
||||
* This stops older libxml2 versions from freeing the nodes
|
||||
* in the tree.
|
||||
*/
|
||||
ret->boolval = 0;
|
||||
}
|
||||
} else {
|
||||
/* If the func:result element has empty content and does not
|
||||
|
@@ -1011,8 +1011,8 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr variable,
|
||||
result = xmlXPathNewCString("");
|
||||
} else {
|
||||
/*
|
||||
* Freeing is not handled there anymore.
|
||||
* QUESTION TODO: What does the above comment mean?
|
||||
* This stops older libxml2 versions from freeing the nodes
|
||||
* in the tree.
|
||||
*/
|
||||
result->boolval = 0;
|
||||
}
|
||||
@@ -1232,7 +1232,11 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
|
||||
if (result == NULL) {
|
||||
result = xmlXPathNewCString("");
|
||||
} else {
|
||||
result->boolval = 0; /* Freeing is not handled there anymore */
|
||||
/*
|
||||
* This stops older libxml2 versions from freeing the nodes
|
||||
* in the tree.
|
||||
*/
|
||||
result->boolval = 0;
|
||||
}
|
||||
#ifdef WITH_XSLT_DEBUG_VARIABLE
|
||||
#ifdef LIBXML_DEBUG_ENABLED
|
||||
|
Reference in New Issue
Block a user