1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-06-15 10:41:43 +03:00

fix float and boolean XPath conversions try to fix Stephane Bidoul attempt

* python/types.c: fix float and boolean XPath conversions
* libxslt/xsltutils.c: try to fix Stephane Bidoul attempt
  at setting XInclude support.
Daniel
This commit is contained in:
Daniel Veillard
2006-07-19 19:04:52 +00:00
parent 4bcbf4443f
commit d3eaa2f845
3 changed files with 25 additions and 0 deletions

View File

@ -425,6 +425,19 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj)
if PyFloat_Check
(obj) {
ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
} else if PyInt_Check(obj) {
ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj));
} else if PyBool_Check (obj) {
if (obj == Py_True) {
ret = xmlXPathNewBoolean(1);
}
else {
ret = xmlXPathNewBoolean(0);
}
} else if PyString_Check
(obj) {
xmlChar *str;