Fix compilation error on Windows
Fix also a compiler warning.
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 @@
}
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 @@
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;
}