Kaydet (Commit) ed2682be authored tarafından Victor Stinner's avatar Victor Stinner

Reuse PyUnicode_Copy() in validate_and_copy_tuple()

üst beac78bb
...@@ -249,9 +249,7 @@ validate_and_copy_tuple(PyObject *tup) ...@@ -249,9 +249,7 @@ validate_and_copy_tuple(PyObject *tup)
return NULL; return NULL;
} }
else { else {
item = PyUnicode_FromUnicode( item = PyUnicode_Copy(item);
PyUnicode_AS_UNICODE(item),
PyUnicode_GET_SIZE(item));
if (item == NULL) { if (item == NULL) {
Py_DECREF(newtuple); Py_DECREF(newtuple);
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment