1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-17 18:21:05 +03:00

make sure SAX endDocument is always called as this could result in a

* parser.c: make sure SAX endDocument is always called as
  this could result in a Python memory leak otherwise (it's
  used to decrement ref-counting)
* python/generator.py python/libxml.c python/libxml.py
  python/libxml2-python-api.xml python/libxml2class.txt
  python/tests/error.py python/tests/xpath.py: implemented
  the suggestions made by Gary Benson and extended the tests
  to match it.
Daniel
This commit is contained in:
Daniel Veillard
2002-03-05 15:41:29 +00:00
parent ba5e18a3fb
commit 8d24cc1898
9 changed files with 321 additions and 23 deletions

View File

@ -22,6 +22,14 @@ if len(res) != 2:
if res[0].name != "doc" or res[1].name != "foo":
print "xpath query: wrong node set value"
sys.exit(1)
ctxt.setContextNode(res[0])
res = ctxt.xpathEval("foo")
if len(res) != 1:
print "xpath query: wrong node set size"
sys.exit(1)
if res[0].name != "foo":
print "xpath query: wrong node set value"
sys.exit(1)
doc.freeDoc()
ctxt.xpathFreeContext()
i = 1000