summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-03 02:06:05 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-03 02:06:05 (GMT)
commit2fd82278cb11cf95cbf49afaab5e8ee920047eb5 (patch)
treeec6208e7cc5df9b3cb62e35a679c9d523428fd05
parentd2a915dbf61197af8e4d5a744f5eed0ee834cbe7 (diff)
downloadcpython-2fd82278cb11cf95cbf49afaab5e8ee920047eb5.zip
cpython-2fd82278cb11cf95cbf49afaab5e8ee920047eb5.tar.gz
cpython-2fd82278cb11cf95cbf49afaab5e8ee920047eb5.tar.bz2
Fix compilation error on Windows
Fix also a compiler warning.
-rw-r--r--Objects/unicodeobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index ddfe566..4a78153 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -509,9 +509,10 @@ resize_copy(PyObject *unicode, Py_ssize_t length)
}
return copy;
} else {
+ PyUnicodeObject *w;
assert(_PyUnicode_WSTR(unicode) != NULL);
assert(_PyUnicode_DATA_ANY(unicode) == NULL);
- PyUnicodeObject *w = _PyUnicode_New(length);
+ w = _PyUnicode_New(length);
if (w == NULL)
return NULL;
copy_length = _PyUnicode_WSTR_LENGTH(unicode);
@@ -6521,7 +6522,7 @@ decode_mbcs(PyUnicodeObject **v,
else {
/* Extend unicode object */
n = PyUnicode_GET_SIZE(*v);
- if (PyUnicode_Resize(v, n + usize) < 0)
+ if (PyUnicode_Resize((PyObject**)v, n + usize) < 0)
return -1;
}