summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/codeobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 0489c7b..c5057bd 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -249,9 +249,7 @@ validate_and_copy_tuple(PyObject *tup)
return NULL;
}
else {
- item = PyUnicode_FromUnicode(
- PyUnicode_AS_UNICODE(item),
- PyUnicode_GET_SIZE(item));
+ item = PyUnicode_Copy(item);
if (item == NULL) {
Py_DECREF(newtuple);
return NULL;