diff options
author | Mike Hommey <glandium@debian.org> | 2007-06-13 20:47:19 +0200 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2007-06-13 20:47:19 +0200 |
commit | 58f9d16e3a77d5207d9ccc413b61e2cb45190018 (patch) | |
tree | f190471ceb2bc35c076cc65159141813da73c8ee /python | |
parent | 789259a1b6850d30acffbb62b11456b9ed7a8f59 (diff) | |
download | libxml2-58f9d16e3a77d5207d9ccc413b61e2cb45190018.tar.gz |
Load /tmp/libxml2-2.6.29 intoupstream/2.6.29.dfsg
libxml2/branches/upstream/current.
Diffstat (limited to 'python')
-rw-r--r-- | python/libxml2-py.c | 32 | ||||
-rw-r--r-- | python/libxml2-python-api.xml | 11 | ||||
-rwxr-xr-x | python/setup.py | 2 | ||||
-rw-r--r-- | python/types.c | 3 |
4 files changed, 46 insertions, 2 deletions
diff --git a/python/libxml2-py.c b/python/libxml2-py.c index c979a3a..0874a60 100644 --- a/python/libxml2-py.c +++ b/python/libxml2-py.c @@ -978,6 +978,22 @@ libxml_xmlParseMarkupDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * +libxml_xmlURISetQueryRaw(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + xmlURIPtr URI; + PyObject *pyobj_URI; + char * query_raw; + + if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetQueryRaw", &pyobj_URI, &query_raw)) + return(NULL); + URI = (xmlURIPtr) PyURI_Get(pyobj_URI); + + if (URI->query_raw != NULL) xmlFree(URI->query_raw); + URI->query_raw = (char *)xmlStrdup((const xmlChar *)query_raw); + Py_INCREF(Py_None); + return(Py_None); +} + +PyObject * libxml_xmlHasNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; xmlAttrPtr c_retval; @@ -14054,6 +14070,22 @@ libxml_xmlUCSIsOldItalic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } #endif /* defined(LIBXML_UNICODE_ENABLED) */ +PyObject * +libxml_xmlURIGetQueryRaw(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + const char * c_retval; + xmlURIPtr URI; + PyObject *pyobj_URI; + + if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetQueryRaw", &pyobj_URI)) + return(NULL); + URI = (xmlURIPtr) PyURI_Get(pyobj_URI); + + c_retval = URI->query_raw; + py_retval = libxml_charPtrConstWrap((const char *) c_retval); + return(py_retval); +} + #if defined(LIBXML_XPATH_ENABLED) PyObject * libxml_xmlXPathPopNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { diff --git a/python/libxml2-python-api.xml b/python/libxml2-python-api.xml index f77a237..42f661d 100644 --- a/python/libxml2-python-api.xml +++ b/python/libxml2-python-api.xml @@ -265,6 +265,17 @@ <arg name='URI' type='xmlURIPtr' info='the URI'/> <arg name='query' type='char *' info='The URI query part'/> </function> + <function name='xmlURIGetQueryRaw' file='python_accessor'> + <info>Get the raw query part from an URI (i.e. the unescaped form).</info> + <return type='const char *' info="The URI query" field="query_raw"/> + <arg name='URI' type='xmlURIPtr' info='the URI'/> + </function> + <function name='xmlURISetQueryRaw' file='python_accessor'> + <info>Set the raw query part of an URI (i.e. the unescaped form).</info> + <return type='void'/> + <arg name='URI' type='xmlURIPtr' info='the URI'/> + <arg name='query_raw' type='char *' info='The raw URI query part'/> + </function> <function name='xmlURIGetFragment' file='python_accessor'> <info>Get the fragment part from an URI</info> <return type='const char *' info="The URI fragment" field="fragment"/> diff --git a/python/setup.py b/python/setup.py index 5eab8dc..191c03d 100755 --- a/python/setup.py +++ b/python/setup.py @@ -226,7 +226,7 @@ else: setup (name = "libxml2-python", # On *nix, the version number is created from setup.py.in # On windows, it is set by configure.js - version = "2.6.28", + version = "2.6.29", description = descr, author = "Daniel Veillard", author_email = "veillard@redhat.com", diff --git a/python/types.c b/python/types.c index 5c5dcca..9a17749 100644 --- a/python/types.c +++ b/python/types.c @@ -525,6 +525,7 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj) ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj)); +#ifdef PyBool_Check } else if PyBool_Check (obj) { if (obj == Py_True) { @@ -533,7 +534,7 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj) else { ret = xmlXPathNewBoolean(0); } - +#endif } else if PyString_Check (obj) { xmlChar *str; |