summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-19 00:28:08 (GMT)
committerGuido van Rossum <guido@python.org>2001-01-19 00:28:08 (GMT)
commit6915c4d0a8b7707e5c5b85d7a8624585d358855c (patch)
tree8d52afc42ad16ec1f0a825c0982c902ea574b18f /Modules
parentfc5ce61abd7f21c2674afc49cc1f2659bef2aa20 (diff)
downloadcpython-6915c4d0a8b7707e5c5b85d7a8624585d358855c.zip
cpython-6915c4d0a8b7707e5c5b85d7a8624585d358855c.tar.gz
cpython-6915c4d0a8b7707e5c5b85d7a8624585d358855c.tar.bz2
Support building this as a DLL under Cygwin.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_cursesmodule.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 6337a4c..d1ffe87 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;