mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Issue 1242657: list(obj) can swallow KeyboardInterrupt.
This commit is contained in:
@@ -268,6 +268,8 @@ builtin_filter(PyObject *self, PyObject *args)
|
||||
|
||||
/* Guess a result list size. */
|
||||
len = _PyObject_LengthHint(seq, 8);
|
||||
if (len == -1)
|
||||
goto Fail_it;
|
||||
|
||||
/* Get a result list. */
|
||||
if (PyList_Check(seq) && seq->ob_refcnt == 1) {
|
||||
|
||||
Reference in New Issue
Block a user