Dynamically initialize ob_type field, for Windows DLL

This commit is contained in:
Guido van Rossum 1996-09-11 23:18:43 +00:00
parent c864364395
commit 622f577eac
1 changed files with 2 additions and 1 deletions

View File

@ -478,7 +478,7 @@ bsddb_getattr(dp, name)
}
static PyTypeObject Bsddbtype = {
PyObject_HEAD_INIT(&PyType_Type)
PyObject_HEAD_INIT(NULL)
0,
"bsddb",
sizeof(bsddbobject),
@ -667,6 +667,7 @@ void
initbsddb() {
PyObject *m, *d;
Bsddbtype.ob_type = &PyType_Type;
m = Py_InitModule("bsddb", bsddbmodule_methods);
d = PyModule_GetDict(m);
BsddbError = PyString_FromString("bsddb.error");