From ef300937c2a1b3ebe19c2835f3b46585825c1e1f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 2 Jun 2023 01:33:17 +0200 Subject: gh-92536: Remove PyUnicode_READY() calls (#105210) Since Python 3.12, PyUnicode_READY() does nothing and always returns 0. --- Python/bltinmodule.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'Python/bltinmodule.c') 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); -- cgit v1.2.3