PyUnicode_AsUTF32String() calls directly _PyUnicode_EncodeUTF32(),

instead of calling the deprecated PyUnicode_EncodeUTF32() function
This commit is contained in:
Victor Stinner 2011-11-20 19:12:52 +01:00
parent 77faf69ca1
commit b960b34577
1 changed files with 1 additions and 6 deletions

View File

@ -5150,12 +5150,7 @@ PyUnicode_EncodeUTF32(const Py_UNICODE *s,
PyObject *
PyUnicode_AsUTF32String(PyObject *unicode)
{
const Py_UNICODE *wstr;
Py_ssize_t wlen;
wstr = PyUnicode_AsUnicodeAndSize(unicode, &wlen);
if (wstr == NULL)
return NULL;
return PyUnicode_EncodeUTF32(wstr, wlen, NULL, 0);
return _PyUnicode_EncodeUTF32(unicode, NULL, 0);
}
/* --- UTF-16 Codec ------------------------------------------------------- */