aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/bltinmodule.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/bltinmodule.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/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index ddddc03ca31..96a7ddd283a 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1914,8 +1914,6 @@ builtin_ord(PyObject *module, PyObject *c)
}
}
else if (PyUnicode_Check(c)) {
- if (PyUnicode_READY(c) == -1)
- return NULL;
size = PyUnicode_GET_LENGTH(c);
if (size == 1) {
ord = (long)PyUnicode_READ_CHAR(c, 0);