diff options
| author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-11 21:53:24 +0200 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-11 21:53:24 +0200 |
| commit | cb77cacedba65cf061a7e9b1da7812f0cbab4967 (patch) | |
| tree | a3c428b445b3134c7195cec7cdfe1612784ee138 /Objects/codeobject.c | |
| parent | 9fde12ef0a3cbe4260897de13f054ec630456992 (diff) | |
| download | cpython-cb77cacedba65cf061a7e9b1da7812f0cbab4967.tar.gz | |
Reuse PyUnicode_Copy() in validate_and_copy_tuple()
Diffstat (limited to 'Objects/codeobject.c')
| -rw-r--r-- | Objects/codeobject.c | 4 |
1 files changed, 1 insertions, 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; |
