]> granicus.if.org Git - python/commitdiff
SF Patch #103185, by jlt63: Some more standard modules cleanup for Cygwin
authorGuido van Rossum <guido@python.org>
Mon, 22 Jan 2001 15:29:14 +0000 (15:29 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 22 Jan 2001 15:29:14 +0000 (15:29 +0000)
Modules/_curses_panel.c
Modules/dbmmodule.c
Modules/regexmodule.c
Modules/socketmodule.c

index e06302df15526c431ac1936ce41354b5db95ddee..4b97aa72b7136d272038042f81d43168ba21f373 100644 (file)
@@ -350,7 +350,7 @@ PyCursesPanel_GetAttr(PyCursesPanelObject *self, char *name)
 /* -------------------------------------------------------*/
 
 PyTypeObject PyCursesPanel_Type = {
-    PyObject_HEAD_INIT(&PyType_Type)
+    PyObject_HEAD_INIT(NULL)
     0,                 /*ob_size*/
     "curses panel",    /*tp_name*/
     sizeof(PyCursesPanelObject),       /*tp_basicsize*/
@@ -469,11 +469,14 @@ static PyMethodDef PyCurses_methods[] = {
 
 /* Initialization function for the module */
 
-void
+DL_EXPORT(void)
 init_curses_panel(void)
 {
     PyObject *m, *d, *v;
 
+       /* Initialize object type */
+       PyCursesPanel_Type.ob_type = &PyType_Type;
+
     import_curses();
         
     /* Create the module and add the functions */
index 684736460b20a5d06a680a7099ab0db3fa72be71..bd14df6b20ba0f375cd798fe420cc57b294958a5 100644 (file)
@@ -285,7 +285,7 @@ dbm_getattr(dbmobject *dp, char *name)
 }
 
 static PyTypeObject Dbmtype = {
-       PyObject_HEAD_INIT(&PyType_Type)
+       PyObject_HEAD_INIT(NULL)
        0,
        "dbm",
        sizeof(dbmobject),
@@ -342,6 +342,7 @@ DL_EXPORT(void)
 initdbm(void) {
        PyObject *m, *d, *s;
 
+       Dbmtype.ob_type = &PyType_Type;
        m = Py_InitModule("dbm", dbmmodule_methods);
        d = PyModule_GetDict(m);
        if (DbmError == NULL)
index da1fc3e4e2b6d104b5f8b693d3c22254b65e60c8..8509f483f5434c8b05d5a07aa018b14f4879b513 100644 (file)
@@ -338,7 +338,7 @@ regobj_getattr(regexobject *re, char *name)
 }
 
 static PyTypeObject Regextype = {
-       PyObject_HEAD_INIT(&PyType_Type)
+       PyObject_HEAD_INIT(NULL)
        0,                                   /*ob_size*/
        "regex",                             /*tp_name*/
        sizeof(regexobject),                 /*tp_size*/
@@ -654,6 +654,9 @@ initregex(void)
        int i;
        char *s;
        
+       /* Initialize object type */
+       Regextype.ob_type = &PyType_Type;
+
        m = Py_InitModule("regex", regex_global_methods);
        d = PyModule_GetDict(m);
 
index e6bddc531090a6fd96250e9d45ff4c1876bdf612..b3571a5ef782d7e1571bb5e1f2c242f5c447eac8 100644 (file)
@@ -2114,7 +2114,7 @@ static PyObject *SSL_getattr(SSLObject *self, char *name)
 }
 
 staticforward PyTypeObject SSL_Type = {
-       PyObject_HEAD_INIT(&PyType_Type)
+       PyObject_HEAD_INIT(NULL)
        0,                              /*ob_size*/
        "SSL",                  /*tp_name*/
        sizeof(SSLObject),              /*tp_basicsize*/
@@ -2381,6 +2381,9 @@ init_socket(void)
                return;
 #endif /* __TOS_OS2__ */
 #endif /* MS_WINDOWS */
+#ifdef USE_SSL
+       SSL_Type.ob_type = &PyType_Type;
+#endif
        m = Py_InitModule3("_socket", PySocket_methods, module_doc);
        d = PyModule_GetDict(m);
        PySocket_Error = PyErr_NewException("socket.error", NULL, NULL);