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)
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;
......
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