Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 72606:5c79977313e4
Fix compilation error on Windows
Fix also a compiler warning.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Mon, 03 Oct 2011 04:06:05 +0200 |
| parents | 2f9ac1eb1a99 |
| children | 8720e6fa6fc5 |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Sun Oct 02 20:34:20 2011 +0200 +++ b/Objects/unicodeobject.c Mon Oct 03 04:06:05 2011 +0200 @@ -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; }
