mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
Coerced PyBool_Type to be able to compare it.
This commit is contained in:
parent
39df66179f
commit
b1d70e2252
1 changed files with 2 additions and 2 deletions
|
@ -2055,7 +2055,7 @@ ifilter_next(ifilterobject *lz)
|
|||
if (item == NULL)
|
||||
return NULL;
|
||||
|
||||
if (lz->func == Py_None || lz->func == PyBool_Type) {
|
||||
if (lz->func == Py_None || lz->func == (PyObject *)&PyBool_Type) {
|
||||
ok = PyObject_IsTrue(item);
|
||||
} else {
|
||||
PyObject *good;
|
||||
|
@ -2199,7 +2199,7 @@ ifilterfalse_next(ifilterfalseobject *lz)
|
|||
if (item == NULL)
|
||||
return NULL;
|
||||
|
||||
if (lz->func == Py_None || lz->func == PyBool_Type) {
|
||||
if (lz->func == Py_None || lz->func == (PyObject *)&PyBool_Type) {
|
||||
ok = PyObject_IsTrue(item);
|
||||
} else {
|
||||
PyObject *good;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue