summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-08-15 21:18:25 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-08-15 21:18:25 (GMT)
commit6f430e496339aea3e688165340456b555d5e1035 (patch)
tree197393decf924def07e006f3e35cf21f2fec0f08 /Python/bltinmodule.c
parentdd7c55250d67de4d430a0c51dba4f3c0cd8f6ed3 (diff)
downloadcpython-6f430e496339aea3e688165340456b555d5e1035.zip
cpython-6f430e496339aea3e688165340456b555d5e1035.tar.gz
cpython-6f430e496339aea3e688165340456b555d5e1035.tar.bz2
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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 232e3dc..0e90490 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -428,9 +428,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;
}
}