1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-29 01:49:22 +03:00

python: Fix compiler warnings when building python3 bindings

This commit is contained in:
Armin K
2013-05-30 19:00:50 +02:00
committed by Daniel Veillard
parent dcc1950319
commit 6eea2f2c60
2 changed files with 5 additions and 5 deletions

View File

@ -296,7 +296,7 @@ xmlPythonFileReadRaw (void * context, char * buffer, int len) {
#ifdef PyUnicode_Check
} else if PyUnicode_Check (ret) {
#if PY_VERSION_HEX >= 0x03030000
size_t size;
Py_ssize_t size;
const char *tmp;
/* tmp doesn't need to be deallocated */
@ -361,7 +361,7 @@ xmlPythonFileRead (void * context, char * buffer, int len) {
#ifdef PyUnicode_Check
} else if PyUnicode_Check (ret) {
#if PY_VERSION_HEX >= 0x03030000
size_t size;
Py_ssize_t size;
const char *tmp;
/* tmp doesn't need to be deallocated */

View File

@ -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;