mirror of
https://github.com/python/cpython.git
synced 2025-07-31 23:23:11 +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)
|
if (item == NULL)
|
||||||
return 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);
|
ok = PyObject_IsTrue(item);
|
||||||
} else {
|
} else {
|
||||||
PyObject *good;
|
PyObject *good;
|
||||||
|
@ -2199,7 +2199,7 @@ ifilterfalse_next(ifilterfalseobject *lz)
|
||||||
if (item == NULL)
|
if (item == NULL)
|
||||||
return 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);
|
ok = PyObject_IsTrue(item);
|
||||||
} else {
|
} else {
|
||||||
PyObject *good;
|
PyObject *good;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue