]> granicus.if.org Git - python/commitdiff
Win32 port. Patches by Milton L. Hankins.
authorGuido van Rossum <guido@python.org>
Sat, 3 Oct 1998 05:13:27 +0000 (05:13 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 3 Oct 1998 05:13:27 +0000 (05:13 +0000)
Modules/gdbmmodule.c

index d916c33366ed7570e17d430d8830b5410359a78c..c8e3369f0751505eb2253697effca25532e2f931 100644 (file)
@@ -41,6 +41,11 @@ PERFORMANCE OF THIS SOFTWARE.
 #include <fcntl.h>
 #include "gdbm.h"
 
+#ifdef WIN32
+#include "gdbmerrno.h"
+extern const char * gdbm_strerror(gdbm_error);
+#endif
+
 static char gdbmmodule__doc__[] = "\
 This module provides an interface to the GNU DBM (GDBM) library.\n\
 \n\
@@ -425,7 +430,7 @@ char *name;
 }
 
 static PyTypeObject Dbmtype = {
-       PyObject_HEAD_INIT(&PyType_Type)
+       PyObject_HEAD_INIT(0)
        0,
        "gdbm",
        sizeof(dbmobject),
@@ -515,6 +520,7 @@ void
 initgdbm() {
        PyObject *m, *d;
 
+       Dbmtype.ob_type = &PyType_Type;
        m = Py_InitModule4("gdbm", dbmmodule_methods,
                            gdbmmodule__doc__, (PyObject *)NULL,
                           PYTHON_API_VERSION);