aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/getargs.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-06-02 01:33:17 +0200
committerGitHub <noreply@github.com>2023-06-02 01:33:17 +0200
commitef300937c2a1b3ebe19c2835f3b46585825c1e1f (patch)
tree34f151a390fb946ff985ed98e6c1bd096c4d090b /Python/getargs.c
parentcbb9ba844f15f2b8127028e6dfd4681b2cb2376f (diff)
downloadcpython-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.c5
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