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:
@ -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
|
||||
|
Reference in New Issue
Block a user