diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/dbmmodule.c | 7 | ||||
-rw-r--r-- | Modules/gdbmmodule.c | 2 | ||||
-rw-r--r-- | Modules/itertoolsmodule.c | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/Modules/dbmmodule.c b/Modules/dbmmodule.c index 7129c8e..875f0e7 100644 --- a/Modules/dbmmodule.c +++ b/Modules/dbmmodule.c @@ -344,6 +344,13 @@ static PyTypeObject Dbmtype = { 0, /*tp_as_number*/ &dbm_as_sequence, /*tp_as_sequence*/ &dbm_as_mapping, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT, /*tp_xxx4*/ }; /* ----------------------------------------------------------------- */ diff --git a/Modules/gdbmmodule.c b/Modules/gdbmmodule.c index 9e1b01d..cf197f5 100644 --- a/Modules/gdbmmodule.c +++ b/Modules/gdbmmodule.c @@ -407,7 +407,7 @@ static PyTypeObject Dbmtype = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - 0, /*tp_xxx4*/ + Py_TPFLAGS_DEFAULT, /*tp_xxx4*/ gdbm_object__doc__, /*tp_doc*/ }; diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 5b6aec3..5c8e86f 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -2025,7 +2025,7 @@ ifilter_next(ifilterobject *lz) if (item == NULL) return NULL; - if (lz->func == Py_None) { + if (lz->func == Py_None || lz->func == (PyObject *)&PyBool_Type) { ok = PyObject_IsTrue(item); } else { PyObject *good; @@ -2169,7 +2169,7 @@ ifilterfalse_next(ifilterfalseobject *lz) if (item == NULL) return NULL; - if (lz->func == Py_None) { + if (lz->func == Py_None || lz->func == (PyObject *)&PyBool_Type) { ok = PyObject_IsTrue(item); } else { PyObject *good; |