Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 72509:876a36feb508
Fix 'c' format of PyUnicode_Format()
formatbuf is now an array of Py_UCS4, not of Py_UNICODE
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Thu, 29 Sep 2011 00:39:24 +0200 |
| parents | 8d4252f0bf14 |
| children | b534b56379cb |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Thu Sep 29 00:16:58 2011 +0200 +++ b/Objects/unicodeobject.c Thu Sep 29 00:39:24 2011 +0200 @@ -12254,7 +12254,7 @@ case 'c': pbuf = formatbuf; kind = PyUnicode_4BYTE_KIND; - len = formatchar(pbuf, sizeof(formatbuf)/sizeof(Py_UNICODE), v); + len = formatchar(pbuf, Py_ARRAY_LENGTH(formatbuf), v); if (len < 0) goto onError; break;
