added an encoding "special comment" to avoid warning message in python2.3
* python/drv_libxml.py: added an encoding "special comment" to avoid
warning message in python2.3 (bug 146889)
* Makefile.am, python/Makefile.am, python/tests/Makefile.am: small
change to make "make tests" a little quieter (MAKEFLAGS+=--silent)
* xpath.c: enhanced to take advantage of current libxslt handling
of tmpRVT. Fixes bug 145547.
diff --git a/ChangeLog b/ChangeLog
index d69cc2d..cc282bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sun Jul 11 22:38:29 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * python/drv_libxml.py: added an encoding "special comment" to avoid
+ warning message in python2.3 (bug 146889)
+ * Makefile.am, python/Makefile.am, python/tests/Makefile.am: small
+ change to make "make tests" a little quieter (MAKEFLAGS+=--silent)
+ * xpath.c: enhanced to take advantage of current libxslt handling
+ of tmpRVT. Fixes bug 145547.
+
Fri Jul 9 14:02:54 CEST 2004 Daniel Veillard <daniel@veillard.com>
* libxml.h uri.c: fixed a couple of problems in the new
diff --git a/Makefile.am b/Makefile.am
index c5763ca..34ca3b5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -123,8 +123,9 @@
testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests NStests IDtests Errtests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@
- @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; $(MAKE) tests ; fi)
- @(cd doc/examples ; $(MAKE) tests)
+ @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \
+ $(MAKE) MAKEFLAGS+=--silent tests ; fi)
+ @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests)
valgrind:
@echo '## Running the regression tests under Valgrind'
diff --git a/python/Makefile.am b/python/Makefile.am
index f473421..00fc6ec 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -69,5 +69,5 @@
all:
endif
tests test: all
- cd tests && $(MAKE) tests
+ cd tests && $(MAKE) MAKEFLAGS+=--silent tests
diff --git a/python/drv_libxml2.py b/python/drv_libxml2.py
index 977c868..421f945 100644
--- a/python/drv_libxml2.py
+++ b/python/drv_libxml2.py
@@ -1,3 +1,4 @@
+# -*- coding: iso-8859-1 -*-
""" A SAX2 driver for libxml2, on top of it's XmlReader API
USAGE
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index 259a1bf..2788c0c 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -46,7 +46,7 @@
if WITH_PYTHON
tests: $(PYTESTS)
- echo "## running Python regression tests"
+ @echo "## running Python regression tests"
-@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
export PYTHONPATH; \
for test in $(PYTESTS) ; \
diff --git a/xpath.c b/xpath.c
index 9bbfdce..eb01145 100644
--- a/xpath.c
+++ b/xpath.c
@@ -1235,9 +1235,11 @@
}
obj = valuePop(ctxt);
ret = obj->nodesetval;
+#if 0
/* to fix memory leak of not clearing obj->user */
if (obj->boolval && obj->user != NULL)
xmlFreeNodeList((xmlNodePtr) obj->user);
+#endif
xmlXPathFreeNodeSetList(obj);
return(ret);
}
@@ -3310,6 +3312,12 @@
ret->stringval = xmlStrdup(val->stringval);
break;
case XPATH_XSLT_TREE:
+#if 0
+/*
+ Removed 11 July 2004 - the current handling of xslt tmpRVT nodes means that
+ this previous handling is no longer correct, and can cause some serious
+ problems (ref. bug 145547)
+*/
if ((val->nodesetval != NULL) &&
(val->nodesetval->nodeTab != NULL)) {
xmlNodePtr cur, tmp;
@@ -3329,11 +3337,13 @@
cur = cur->next;
}
}
+
ret->nodesetval = xmlXPathNodeSetCreate((xmlNodePtr) top);
} else
ret->nodesetval = xmlXPathNodeSetCreate(NULL);
/* Deallocate the copied tree value */
break;
+#endif
case XPATH_NODESET:
ret->nodesetval = xmlXPathNodeSetMerge(NULL, val->nodesetval);
/* Do not deallocate the copied tree value */
@@ -3370,10 +3380,13 @@
if (obj == NULL) return;
if ((obj->type == XPATH_NODESET) || (obj->type == XPATH_XSLT_TREE)) {
if (obj->boolval) {
+#if 0
if (obj->user != NULL) {
xmlXPathFreeNodeSet(obj->nodesetval);
xmlFreeNodeList((xmlNodePtr) obj->user);
- } else if (obj->nodesetval != NULL)
+ } else
+#endif
+ if (obj->nodesetval != NULL)
xmlXPathFreeValueTree(obj->nodesetval);
} else {
if (obj->nodesetval != NULL)