[Python-checkins] cpython: Reuse PyUnicode_Copy() in validate_and_copy_tuple()
victor.stinner
python-checkins at python.org
Tue Oct 11 22:13:02 CEST 2011
http://hg.python.org/cpython/rev/5aaf83414ae7
changeset: 72862:5aaf83414ae7
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Tue Oct 11 21:53:24 2011 +0200
summary:
Reuse PyUnicode_Copy() in validate_and_copy_tuple()
files:
Objects/codeobject.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -249,9 +249,7 @@
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;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list