Added socket.error to the socket module's C API.
Extension modules
-----------------
+- socket.sslerror is now a subclass of socket.error . Also added
+ socket.error to the socket module's C API.
+
- Bug #920575: A problem that _locale module segfaults on
nl_langinfo(ERA) caused by GNU libc's illegal NULL return is fixed.
SSLeay_add_ssl_algorithms();
/* Add symbols to module dict */
- PySSLErrorObject = PyErr_NewException("socket.sslerror", NULL, NULL);
+ PySSLErrorObject = PyErr_NewException("socket.sslerror",
+ PySocketModule.error,
+ NULL);
if (PySSLErrorObject == NULL)
return;
PyDict_SetItemString(d, "sslerror", PySSLErrorObject);
PySocketModule_APIObject PySocketModuleAPI =
{
&sock_type,
+ NULL
};
socket_error = PyErr_NewException("socket.error", NULL, NULL);
if (socket_error == NULL)
return;
+ PySocketModuleAPI.error = socket_error;
Py_INCREF(socket_error);
PyModule_AddObject(m, "error", socket_error);
socket_herror = PyErr_NewException("socket.herror",
/* C API for usage by other Python modules */
typedef struct {
PyTypeObject *Sock_Type;
+ PyObject *error;
} PySocketModule_APIObject;
/* XXX The net effect of the following appears to be to define a function