mirror of https://github.com/python/cpython
Fix 'c' format of PyUnicode_Format()
formatbuf is now an array of Py_UCS4, not of Py_UNICODE
This commit is contained in:
parent
c17f540b7a
commit
b9dcffb51e
|
@ -12254,7 +12254,7 @@ PyUnicode_Format(PyObject *format, PyObject *args)
|
||||||
case 'c':
|
case 'c':
|
||||||
pbuf = formatbuf;
|
pbuf = formatbuf;
|
||||||
kind = PyUnicode_4BYTE_KIND;
|
kind = PyUnicode_4BYTE_KIND;
|
||||||
len = formatchar(pbuf, sizeof(formatbuf)/sizeof(Py_UNICODE), v);
|
len = formatchar(pbuf, Py_ARRAY_LENGTH(formatbuf), v);
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
goto onError;
|
goto onError;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue