From: Facundo Batista Date: Mon, 25 Feb 2008 23:46:02 +0000 (+0000) Subject: Coerced PyBool_Type to be able to compare it. X-Git-Tag: v2.6a1~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1d70e2252c108cb04254b2b1c6a1c0f75d7d19c;p=python Coerced PyBool_Type to be able to compare it. --- diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index e53c35347e..d95376a581 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -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;