SF Patch #103185, by jlt63: Some more standard modules cleanup for Cygwin
diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c
index e06302d..4b97aa7 100644
--- a/Modules/_curses_panel.c
+++ b/Modules/_curses_panel.c
@@ -350,7 +350,7 @@
 /* -------------------------------------------------------*/
 
 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 @@
 
 /* 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 */
diff --git a/Modules/dbmmodule.c b/Modules/dbmmodule.c
index 6847364..bd14df6 100644
--- a/Modules/dbmmodule.c
+++ b/Modules/dbmmodule.c
@@ -285,7 +285,7 @@
 }
 
 static PyTypeObject Dbmtype = {
-	PyObject_HEAD_INIT(&PyType_Type)
+	PyObject_HEAD_INIT(NULL)
 	0,
 	"dbm",
 	sizeof(dbmobject),
@@ -342,6 +342,7 @@
 initdbm(void) {
 	PyObject *m, *d, *s;
 
+	Dbmtype.ob_type = &PyType_Type;
 	m = Py_InitModule("dbm", dbmmodule_methods);
 	d = PyModule_GetDict(m);
 	if (DbmError == NULL)
diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c
index da1fc3e..8509f48 100644
--- a/Modules/regexmodule.c
+++ b/Modules/regexmodule.c
@@ -338,7 +338,7 @@
 }
 
 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 @@
 	int i;
 	char *s;
 	
+	/* Initialize object type */
+	Regextype.ob_type = &PyType_Type;
+
 	m = Py_InitModule("regex", regex_global_methods);
 	d = PyModule_GetDict(m);
 
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index e6bddc5..b3571a5 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -2114,7 +2114,7 @@
 }
 
 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 @@
 		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);