diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-15 23:20:39 +0200 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-15 23:20:39 +0200 |
| commit | da33e8cdc0c19f4a9e407f4a813fcf76870f35c2 (patch) | |
| tree | 1f95e72df9d6a969ae7e79759f6c926cbc98c509 /Python/bltinmodule.c | |
| parent | f9a713c7f197f14cd0e803ce9e00970a0c52dc07 (diff) | |
| parent | 1d494aa59c54cdf7d189b6b2e41502da941367b7 (diff) | |
| download | cpython-da33e8cdc0c19f4a9e407f4a813fcf76870f35c2.tar.gz | |
Issue #15604: Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
Diffstat (limited to 'Python/bltinmodule.c')
| -rw-r--r-- | Python/bltinmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 88b48c0fa6..4a98b032cf 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -429,9 +429,11 @@ filter_next(filterobject *lz) ok = PyObject_IsTrue(good); Py_DECREF(good); } - if (ok) + if (ok > 0) return item; Py_DECREF(item); + if (ok < 0) + return NULL; } } |
