GNOME Bugzilla – Bug 684390
Support registering XPath variables in Python
Last modified: 2013-03-27 08:15:45 UTC
Attaching a patch to add support for registering variables with an XPath context in Python. I need this to fully support its:param in the upcoming ITS 2.0 specification. This patch also removes the Py_DECREF(obj) from the end of libxml_xmlXPathObjectPtrConvert in python/types.c. I'm pretty sure this is wrong. obj is passed as an argument, and the function never increases the reference count on it, so I don't think it has a reference it should decrease. With the Py_DECREF call in place, I get random segfaults after registering a variable. Without it, everything works correctly.
Created attachment 224770 [details] [review] Implement xpathRegisterVariable for Python bindings
sorry for the delay :-\ Okay, looks sane, and my own regtests seems to work, so applied and pushed, https://git.gnome.org/browse/libxml2/commit/?id=519bc6a3ab82445a8719f548d0450efe02cc9c82 thanks Shaun ! Daniel