From ed2682be2f6de05ead5f777ed3aaee92180df4f9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 11 Oct 2011 21:53:24 +0200 Subject: [PATCH] Reuse PyUnicode_Copy() in validate_and_copy_tuple() --- Objects/codeobject.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 0489c7b981..c5057bdeb9 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; -- 2.49.0