diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-11 19:53:24 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-11 19:53:24 (GMT) |
commit | ed2682be2f6de05ead5f777ed3aaee92180df4f9 (patch) | |
tree | 371fa62833d09c93402bebbae6ab24ea168b5807 /Objects/codeobject.c | |
parent | beac78bb242ba56088570d9df3a852f581adc0d5 (diff) | |
download | cpython-ed2682be2f6de05ead5f777ed3aaee92180df4f9.zip cpython-ed2682be2f6de05ead5f777ed3aaee92180df4f9.tar.gz cpython-ed2682be2f6de05ead5f777ed3aaee92180df4f9.tar.bz2 |
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 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; |