From 6915c4d0a8b7707e5c5b85d7a8624585d358855c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 19 Jan 2001 00:28:08 +0000 Subject: [PATCH] Support building this as a DLL under Cygwin. --- Modules/_cursesmodule.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 6337a4c8eeb..d1ffe878f52 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -1440,7 +1440,7 @@ PyCursesWindow_GetAttr(PyCursesWindowObject *self, char *name) /* -------------------------------------------------------*/ PyTypeObject PyCursesWindow_Type = { - PyObject_HEAD_INIT(&PyType_Type) + PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ "curses window", /*tp_name*/ sizeof(PyCursesWindowObject), /*tp_basicsize*/ @@ -2431,12 +2431,15 @@ static PyMethodDef PyCurses_methods[] = { /* Initialization function for the module */ -void +DL_EXPORT(void) init_curses(void) { PyObject *m, *d, *v, *c_api_object; static void *PyCurses_API[PyCurses_API_pointers]; + /* Initialize object type */ + PyCursesWindow_Type.ob_type = &PyType_Type; + /* Initialize the C API pointer array */ PyCurses_API[0] = (void *)&PyCursesWindow_Type; PyCurses_API[1] = (void *)func_PyCursesSetupTermCalled;