]> granicus.if.org Git - python/commitdiff
Coerced PyBool_Type to be able to compare it.
authorFacundo Batista <facundobatista@gmail.com>
Mon, 25 Feb 2008 23:46:02 +0000 (23:46 +0000)
committerFacundo Batista <facundobatista@gmail.com>
Mon, 25 Feb 2008 23:46:02 +0000 (23:46 +0000)
Modules/itertoolsmodule.c

index e53c35347e4f811d5fc628cacac4b6437d0579bb..d95376a581dd9f46c19c104cf864e19a79184482 100644 (file)
@@ -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;