diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-20 18:12:52 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-20 18:12:52 (GMT) |
commit | b960b3457745453e117948d29736861c1a7a6edd (patch) | |
tree | dd2a5f1c73bb0a3c94ea7e12887c3eb09974a28e /Objects/unicodeobject.c | |
parent | 77faf69ca1e024cd48c82c882bfcad34be05da63 (diff) | |
download | cpython-b960b3457745453e117948d29736861c1a7a6edd.zip cpython-b960b3457745453e117948d29736861c1a7a6edd.tar.gz cpython-b960b3457745453e117948d29736861c1a7a6edd.tar.bz2 |
PyUnicode_AsUTF32String() calls directly _PyUnicode_EncodeUTF32(),
instead of calling the deprecated PyUnicode_EncodeUTF32() function
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9c1705d..7aa5ff0 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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 ------------------------------------------------------- */ |