Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
06c34798
Commit
06c34798
authored
Mar 23, 2004
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make socket.sslerror a subclass of socket.error .
Added socket.error to the socket module's C API.
parent
fee6f33e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
1 deletion
+9
-1
Misc/NEWS
Misc/NEWS
+3
-0
Modules/_ssl.c
Modules/_ssl.c
+3
-1
Modules/socketmodule.c
Modules/socketmodule.c
+2
-0
Modules/socketmodule.h
Modules/socketmodule.h
+1
-0
No files found.
Misc/NEWS
View file @
06c34798
...
...
@@ -195,6 +195,9 @@ Core and builtins
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.
...
...
Modules/_ssl.c
View file @
06c34798
...
...
@@ -609,7 +609,9 @@ init_ssl(void)
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
);
...
...
Modules/socketmodule.c
View file @
06c34798
...
...
@@ -3559,6 +3559,7 @@ static
PySocketModule_APIObject
PySocketModuleAPI
=
{
&
sock_type
,
NULL
};
...
...
@@ -3596,6 +3597,7 @@ init_socket(void)
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"
,
...
...
Modules/socketmodule.h
View file @
06c34798
...
...
@@ -160,6 +160,7 @@ typedef struct {
/* 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment