diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-28 22:39:24 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-28 22:39:24 (GMT) |
commit | b9dcffb51e0075f70434febb6ea557cc4d22f5fd (patch) | |
tree | e178ed3c0ee74f700050ad89e8e778b39425c587 | |
parent | c17f540b7a370b2860c183c97787d28aa6c7ccf3 (diff) | |
download | cpython-b9dcffb51e0075f70434febb6ea557cc4d22f5fd.zip cpython-b9dcffb51e0075f70434febb6ea557cc4d22f5fd.tar.gz cpython-b9dcffb51e0075f70434febb6ea557cc4d22f5fd.tar.bz2 |
Fix 'c' format of PyUnicode_Format()
formatbuf is now an array of Py_UCS4, not of Py_UNICODE
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ PyUnicode_Format(PyObject *format, PyObject *args) 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; |