Dynamically initialize ob_type field, for Windows DLL
diff --git a/Modules/bsddbmodule.c b/Modules/bsddbmodule.c
index 3007d3d..1a82bd7 100644
--- a/Modules/bsddbmodule.c
+++ b/Modules/bsddbmodule.c
@@ -478,7 +478,7 @@
}
static PyTypeObject Bsddbtype = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0,
"bsddb",
sizeof(bsddbobject),
@@ -667,6 +667,7 @@
initbsddb() {
PyObject *m, *d;
+ Bsddbtype.ob_type = &PyType_Type;
m = Py_InitModule("bsddb", bsddbmodule_methods);
d = PyModule_GetDict(m);
BsddbError = PyString_FromString("bsddb.error");