summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c5
1 files changed, 4 insertions, 1 deletions
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 @@ 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);