mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
Reuse PyUnicode_Copy() in validate_and_copy_tuple()
This commit is contained in:
parent
beac78bb24
commit
ed2682be2f
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue