diff Objects/codeobject.c @ 72862:5aaf83414ae7

Reuse PyUnicode_Copy() in validate_and_copy_tuple()
author Victor Stinner <victor.stinner@haypocalc.com>
date Tue, 11 Oct 2011 21:53:24 +0200
parents 8beaa9a37387
children 9c76bb654809
line wrap: on
line diff
--- a/Objects/codeobject.c	Tue Oct 11 21:55:01 2011 +0200
+++ b/Objects/codeobject.c	Tue Oct 11 21:53:24 2011 +0200
@@ -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;