commit | b9dcffb51e0075f70434febb6ea557cc4d22f5fd | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Thu Sep 29 00:39:24 2011 +0200 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Thu Sep 29 00:39:24 2011 +0200 |
tree | e178ed3c0ee74f700050ad89e8e778b39425c587 | |
parent | c17f540b7a370b2860c183c97787d28aa6c7ccf3 [diff] [blame] |
Fix 'c' format of PyUnicode_Format() formatbuf is now an array of Py_UCS4, not of Py_UNICODE
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index c6dcb58..bff74d9 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -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;