[xml] XInclude patch to copy private user data
- From: Michael Day <mikeday yeslogic com>
- To: xml gnome org
- Subject: [xml] XInclude patch to copy private user data
- Date: Fri, 24 Nov 2006 18:14:14 +1100
Hi,
This patch copies private user data from one XInclude context to a
created "child context"; I missed this in my earlier patch that added
support for passing private user data to the parsing context.
Cheers,
Michael
Index: xinclude.c
===================================================================
RCS file: /cvs/gnome/libxml2/xinclude.c,v
retrieving revision 1.85
diff -u -r1.85 xinclude.c
--- xinclude.c 29 Sep 2006 09:15:59 -0000 1.85
+++ xinclude.c 24 Nov 2006 07:12:34 -0000
@@ -673,6 +673,10 @@
newctxt = xmlXIncludeNewContext(doc);
if (newctxt != NULL) {
/*
+ * Copy the private user data
+ */
+ newctxt->_private = ctxt->_private;
+ /*
* Copy the existing document set
*/
newctxt->incMax = ctxt->incMax;
@@ -1930,6 +1934,7 @@
newctxt = xmlXIncludeNewContext(ctxt->doc);
if (newctxt == NULL)
return (-1);
+ newctxt->_private = ctxt->_private;
newctxt->base = xmlStrdup(ctxt->base); /* Inherit the base from the
existing context */
xmlXIncludeSetFlags(newctxt, ctxt->parseFlags);
ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children);
Index: xinclude.c
===================================================================
RCS file: /cvs/gnome/libxml2/xinclude.c,v
retrieving revision 1.85
diff -u -r1.85 xinclude.c
--- xinclude.c 29 Sep 2006 09:15:59 -0000 1.85
+++ xinclude.c 24 Nov 2006 07:12:34 -0000
@@ -673,6 +673,10 @@
newctxt = xmlXIncludeNewContext(doc);
if (newctxt != NULL) {
/*
+ * Copy the private user data
+ */
+ newctxt->_private = ctxt->_private;
+ /*
* Copy the existing document set
*/
newctxt->incMax = ctxt->incMax;
@@ -1930,6 +1934,7 @@
newctxt = xmlXIncludeNewContext(ctxt->doc);
if (newctxt == NULL)
return (-1);
+ newctxt->_private = ctxt->_private;
newctxt->base = xmlStrdup(ctxt->base); /* Inherit the base from the existing context */
xmlXIncludeSetFlags(newctxt, ctxt->parseFlags);
ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]