summaryrefslogtreecommitdiffstats
path: root/Modules/_pickle.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/_pickle.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/_pickle.c')
-rw-r--r--Modules/_pickle.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index bf7ecae..418eea2 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -2602,9 +2602,6 @@ raw_unicode_escape(PyObject *obj)
int kind;
_PyBytesWriter writer;
- if (PyUnicode_READY(obj))
- return NULL;
-
_PyBytesWriter_Init(&writer);
size = PyUnicode_GET_LENGTH(obj);
@@ -2674,9 +2671,6 @@ write_unicode_binary(PicklerObject *self, PyObject *obj)
Py_ssize_t size;
const char *data;
- if (PyUnicode_READY(obj))
- return -1;
-
data = PyUnicode_AsUTF8AndSize(obj, &size);
if (data == NULL) {
/* Issue #8383: for strings with lone surrogates, fallback on the