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