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/import.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/import.c')
-rw-r--r-- | Python/import.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/Python/import.c b/Python/import.c index 9e1857d5f3e..7f04b1aa609 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2610,10 +2610,6 @@ resolve_name(PyThreadState *tstate, PyObject *name, PyObject *globals, int level if (!haspath) { Py_ssize_t dot; - if (PyUnicode_READY(package) < 0) { - goto error; - } - dot = PyUnicode_FindChar(package, '.', 0, PyUnicode_GET_LENGTH(package), -1); if (dot == -2) { @@ -2762,9 +2758,6 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals, "module name must be a string"); goto error; } - if (PyUnicode_READY(name) < 0) { - goto error; - } if (level < 0) { _PyErr_SetString(tstate, PyExc_ValueError, "level must be >= 0"); goto error; |