diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-02 01:33:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 01:33:17 +0200 |
commit | ef300937c2a1b3ebe19c2835f3b46585825c1e1f (patch) | |
tree | 34f151a390fb946ff985ed98e6c1bd096c4d090b /Python/getargs.c | |
parent | cbb9ba844f15f2b8127028e6dfd4681b2cb2376f (diff) | |
download | cpython-ef300937c2a1b3ebe19c2835f3b46585825c1e1f.tar.gz cpython-ef300937c2a1b3ebe19c2835f3b46585825c1e1f.zip |
gh-92536: Remove PyUnicode_READY() calls (#105210)
Since Python 3.12, PyUnicode_READY() does nothing and always
returns 0.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 5639aba9bc9..45befab4f8b 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -824,9 +824,6 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, if (!PyUnicode_Check(arg)) return converterr("a unicode character", arg, msgbuf, bufsize); - if (PyUnicode_READY(arg)) - RETURN_ERR_OCCURRED; - if (PyUnicode_GET_LENGTH(arg) != 1) return converterr("a unicode character", arg, msgbuf, bufsize); @@ -1144,8 +1141,6 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, case 'U': { /* PyUnicode object */ PyObject **p = va_arg(*p_va, PyObject **); if (PyUnicode_Check(arg)) { - if (PyUnicode_READY(arg) == -1) - RETURN_ERR_OCCURRED; *p = arg; } else |