mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #18408: Fix listpop(), handle list_ass_slice() failure
This commit is contained in:
parent
479054bca7
commit
095d99ffff
1 changed files with 4 additions and 6 deletions
|
@ -934,12 +934,10 @@ listpop(PyListObject *self, PyObject *args)
|
|||
}
|
||||
Py_INCREF(v);
|
||||
status = list_ass_slice(self, i, i+1, (PyObject *)NULL);
|
||||
assert(status >= 0);
|
||||
/* Use status, so that in a release build compilers don't
|
||||
* complain about the unused name.
|
||||
*/
|
||||
(void) status;
|
||||
|
||||
if (status < 0) {
|
||||
Py_DECREF(v);
|
||||
return NULL;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue