From b1d70e2252c108cb04254b2b1c6a1c0f75d7d19c Mon Sep 17 00:00:00 2001 From: Facundo Batista Date: Mon, 25 Feb 2008 23:46:02 +0000 Subject: [PATCH] Coerced PyBool_Type to be able to compare it. --- Modules/itertoolsmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index e53c35347e4..d95376a581d 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;