summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-06-01 23:33:17 (GMT)
committerGitHub <noreply@github.com>2023-06-01 23:33:17 (GMT)
commitef300937c2a1b3ebe19c2835f3b46585825c1e1f (patch)
tree34f151a390fb946ff985ed98e6c1bd096c4d090b /Modules/socketmodule.c
parentcbb9ba844f15f2b8127028e6dfd4681b2cb2376f (diff)
downloadcpython-ef300937c2a1b3ebe19c2835f3b46585825c1e1f.zip
cpython-ef300937c2a1b3ebe19c2835f3b46585825c1e1f.tar.gz
cpython-ef300937c2a1b3ebe19c2835f3b46585825c1e1f.tar.bz2
gh-92536: Remove PyUnicode_READY() calls (#105210)
Since Python 3.12, PyUnicode_READY() does nothing and always returns 0.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index a86aaed..3add802 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1717,9 +1717,6 @@ idna_converter(PyObject *obj, struct maybe_idna *data)
len = PyByteArray_Size(obj);
}
else if (PyUnicode_Check(obj)) {
- if (PyUnicode_READY(obj) == -1) {
- return 0;
- }
if (PyUnicode_IS_COMPACT_ASCII(obj)) {
data->buf = PyUnicode_DATA(obj);
len = PyUnicode_GET_LENGTH(obj);