[Python-checkins] python/dist/src/Modules socketmodule.c, 1.285,
1.286 socketmodule.h, 1.11, 1.12 _ssl.c, 1.15, 1.16
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Tue Mar 23 18:16:56 EST 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32400/Modules
Modified Files:
socketmodule.c socketmodule.h _ssl.c
Log Message:
Make socket.sslerror a subclass of socket.error .
Added socket.error to the socket module's C API.
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.285
retrieving revision 1.286
diff -C2 -d -r1.285 -r1.286
*** socketmodule.c 16 Feb 2004 05:35:28 -0000 1.285
--- socketmodule.c 23 Mar 2004 23:16:53 -0000 1.286
***************
*** 3560,3563 ****
--- 3560,3564 ----
{
&sock_type,
+ NULL
};
***************
*** 3597,3600 ****
--- 3598,3602 ----
if (socket_error == NULL)
return;
+ PySocketModuleAPI.error = socket_error;
Py_INCREF(socket_error);
PyModule_AddObject(m, "error", socket_error);
Index: socketmodule.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** socketmodule.h 2 Feb 2004 08:48:45 -0000 1.11
--- socketmodule.h 23 Mar 2004 23:16:54 -0000 1.12
***************
*** 161,164 ****
--- 161,165 ----
typedef struct {
PyTypeObject *Sock_Type;
+ PyObject *error;
} PySocketModule_APIObject;
Index: _ssl.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_ssl.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** _ssl.c 27 Oct 2003 14:24:37 -0000 1.15
--- _ssl.c 23 Mar 2004 23:16:54 -0000 1.16
***************
*** 610,614 ****
/* Add symbols to module dict */
! PySSLErrorObject = PyErr_NewException("socket.sslerror", NULL, NULL);
if (PySSLErrorObject == NULL)
return;
--- 610,616 ----
/* Add symbols to module dict */
! PySSLErrorObject = PyErr_NewException("socket.sslerror",
! PySocketModule.error,
! NULL);
if (PySSLErrorObject == NULL)
return;
More information about the Python-checkins
mailing list