summaryrefslogtreecommitdiff
path: root/python/types.c
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2015-09-21 22:55:55 +0800
committerAron Xu <aron@debian.org>2015-09-21 22:55:55 +0800
commite85cf827a804d9abf4cbf48af6394c49331de322 (patch)
treeaab761b5168447ea51ad1a64c9e1594e48f84b12 /python/types.c
parent4b692ee8530176868e4832e30bdc4ba5bc145948 (diff)
downloadlibxml2-e85cf827a804d9abf4cbf48af6394c49331de322.tar.gz
Revert "Merge tag 'upstream/2.9.1+dfsg1'"
This reverts commit 21ee18bdbc9a9d4500e12a1399d51c593b8b31d4, reversing changes made to de338c1adfa336ddb5177ceb5c63bcd868a0ebc7.
Diffstat (limited to 'python/types.c')
-rw-r--r--python/types.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/types.c b/python/types.c
index 31c909a..f237677 100644
--- a/python/types.c
+++ b/python/types.c
@@ -594,7 +594,7 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
}
xmlXPathObjectPtr
-libxml_xmlXPathObjectPtrConvert(PyObject * obj)
+libxml_xmlXPathObjectPtrConvert(PyObject *obj)
{
xmlXPathObjectPtr ret = NULL;
@@ -633,11 +633,11 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj)
#if PY_VERSION_HEX >= 0x03030000
xmlChar *str;
const char *tmp;
- size_t size;
+ Py_ssize_t size;
/* tmp doesn't need to be deallocated */
tmp = PyUnicode_AsUTF8AndSize(obj, &size);
- str = xmlStrndup(tmp, (int) size);
+ str = xmlStrndup((const xmlChar *) tmp, (int) size);
ret = xmlXPathWrapString(str);
#else
xmlChar *str = NULL;