diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-12-08 10:25:02 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-12-08 10:25:02 +0000 |
commit | f88d8cf9f1c9538dba187290ad5add003dc22bc7 (patch) | |
tree | 1b39aec7d1a58636c9a4ee70dd01df14caa85616 /python/libxml.py | |
parent | fded7bf91baea07a9002e6fb8b0945cef29b2b11 (diff) | |
download | libxml2-f88d8cf9f1c9538dba187290ad5add003dc22bc7.tar.gz |
tried to fix the problems reported in bug #126735 fixed again some problem
* python/libxml.py: tried to fix the problems reported in
bug #126735
* xpath.c SAX2.c error.c parser.c valid.c include/libxml/xmlerror.h:
fixed again some problem trying to use the structured error
handlers, c.f. bug #126735
* result/VC/ElementValid: tiny change due to the fix
Daniel
Diffstat (limited to 'python/libxml.py')
-rw-r--r-- | python/libxml.py | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/python/libxml.py b/python/libxml.py index 41103c66..92c4c3cf 100644 --- a/python/libxml.py +++ b/python/libxml.py @@ -362,21 +362,25 @@ class xmlCore: ctxt.xpathFreeContext() return res - # - # Selecting nodes using XPath, faster because the context - # is allocated just once per xmlDoc. - # +# # +# # Selecting nodes using XPath, faster because the context +# # is allocated just once per xmlDoc. +# # +# # Removed: DV memleaks c.f. #126735 +# # +# def xpathEval2(self, expr): +# doc = self.doc +# if doc == None: +# return None +# try: +# doc._ctxt.setContextNode(self) +# except: +# doc._ctxt = doc.xpathNewContext() +# doc._ctxt.setContextNode(self) +# res = doc._ctxt.xpathEval(expr) +# return res def xpathEval2(self, expr): - doc = self.doc - if doc == None: - return None - try: - doc._ctxt.setContextNode(self) - except: - doc._ctxt = doc.xpathNewContext() - doc._ctxt.setContextNode(self) - res = doc._ctxt.xpathEval(expr) - return res + return self.xpathEval(expr) # support for python2 iterators def walk_depth_first(self): @@ -390,7 +394,7 @@ class xmlCore: self.doc._ctxt.xpathFreeContext() except: pass - libxml2mod.freeDoc(self._o) + libxml2mod.xmlFreeDoc(self._o) # |