# HG changeset patch # User paulb # Date 1116173325 0 # Node ID 34d18559c426a6f1a62adc8c5274fa1de50e7681 # Parent e48fa274811fca9a457b7ba2dc8b71647db251d8 [project @ 2005-05-15 16:08:45 by paulb] Added XPath context freeing. diff -r e48fa274811f -r 34d18559c426 libxml2dom/macrolib/macrolib.py --- a/libxml2dom/macrolib/macrolib.py Sun May 15 15:46:44 2005 +0000 +++ b/libxml2dom/macrolib/macrolib.py Sun May 15 16:08:45 2005 +0000 @@ -317,8 +317,9 @@ # NOTE: Discover namespaces from the node. for prefix, ns in (namespaces or {}).items(): libxml2mod.xmlXPathRegisterNs(context, prefix, ns) - # NOTE: May need to tidy up the context. - return libxml2mod.xmlXPathEval(expr, context) + result = libxml2mod.xmlXPathEval(expr, context) + libxml2mod.xmlXPathFreeContext(context) + return result # Utility functions.