1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-20 03:52:25 +03:00

patch from Nic Ferrier to provide a better type mapping from XPath to

* python/types.c: patch from Nic Ferrier to provide a better type
  mapping from XPath to python
Daniel
This commit is contained in:
Daniel Veillard
2006-06-18 17:40:53 +00:00
parent 381ff364dc
commit a4bd369232
2 changed files with 19 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
Sun Jun 18 18:44:56 EDT 2006 Daniel Veillard <daniel@veillard.com>
* python/types.c: patch from Nic Ferrier to provide a better type
mapping from XPath to python
Sun Jun 18 18:35:50 EDT 2006 Daniel Veillard <daniel@veillard.com> Sun Jun 18 18:35:50 EDT 2006 Daniel Veillard <daniel@veillard.com>
* runtest.c: applied patch from Boz for VMS and reporting * runtest.c: applied patch from Boz for VMS and reporting

View File

@@ -422,6 +422,20 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj)
if PyFloat_Check if PyFloat_Check
(obj) { (obj) {
ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(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 } else if PyString_Check
(obj) { (obj) {
xmlChar *str; xmlChar *str;