summaryrefslogtreecommitdiff
path: root/Modules/dlmodule.c
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2001-02-27 20:54:23 +0000
committerAndrew M. Kuchling <amk@amk.ca>2001-02-27 20:54:23 +0000
commit4ba5e8c68d68d977fdd4edef849a6ca6dd00ea29 (patch)
tree2d50dc403a5697274bf135394d29f6fd43ccae22 /Modules/dlmodule.c
parent29f3ec673967a98ce0f1f3f0deb8c98195bac87f (diff)
downloadcpython-4ba5e8c68d68d977fdd4edef849a6ca6dd00ea29.tar.gz
Patch #404680: disables the nis module and enables the dl module when
building under Cygwin. Makes some fixes to the dlmodule in order to compile with Cygwin.
Diffstat (limited to 'Modules/dlmodule.c')
-rw-r--r--Modules/dlmodule.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c
index bb49a50007..8c77133596 100644
--- a/Modules/dlmodule.c
+++ b/Modules/dlmodule.c
@@ -134,7 +134,7 @@ dl_getattr(dlobject *xp, char *name)
static PyTypeObject Dltype = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"dl", /*tp_name*/
sizeof(dlobject), /*tp_basicsize*/
@@ -199,7 +199,7 @@ insint(PyObject *d, char *name, int value)
Py_XDECREF(v);
}
-void
+DL_EXPORT(void)
initdl(void)
{
PyObject *m, *d, *x;
@@ -211,6 +211,9 @@ initdl(void)
return;
}
+ /* Initialize object type */
+ Dltype.ob_type = &PyType_Type;
+
/* Create the module and add the functions */
m = Py_InitModule("dl", dl_methods);