mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-31 02:43:06 +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:
@ -1,3 +1,9 @@
|
||||
Wed Jul 19 15:06:39 EDT 2006 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* python/types.c: fix float and boolean XPath conversions
|
||||
* libxslt/xsltutils.c: try to fix Stephane Bidoul attempt
|
||||
at setting XInclude support.
|
||||
|
||||
Mon Jul 17 11:15:23 PDT 2006 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* Updated tests affected by recent library changes -
|
||||
|
@ -1383,7 +1383,13 @@ xsltSetCtxtParseOptions(xsltTransformContextPtr ctxt, int options)
|
||||
if (ctxt == NULL)
|
||||
return(-1);
|
||||
oldopts = ctxt->parserOptions;
|
||||
if (ctxt->xinclude)
|
||||
oldopts |= XML_PARSE_XINCLUDE;
|
||||
ctxt->parserOptions = options;
|
||||
if (options & XML_PARSE_XINCLUDE)
|
||||
ctxt->xinclude = 1;
|
||||
else
|
||||
ctxt->xinclude = 0;
|
||||
return(oldopts);
|
||||
}
|
||||
|
||||
|
@ -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