diff options
author | Guido van Rossum <guido@python.org> | 1997-05-21 14:37:37 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-21 14:37:37 (GMT) |
commit | 3b4b6fc602402058ece0506ee8dab5c46ec39adc (patch) | |
tree | 4f8ffe648ab6d227038d46090426f8427faa6d86 /Modules | |
parent | 05ba2ab720dff2a2966a481329a4f90bea5eea85 (diff) | |
download | cpython-3b4b6fc602402058ece0506ee8dab5c46ec39adc.zip cpython-3b4b6fc602402058ece0506ee8dab5c46ec39adc.tar.gz cpython-3b4b6fc602402058ece0506ee8dab5c46ec39adc.tar.bz2 |
Add socket.socket_type, as discussed on c.l.p.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/socketmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 52aca56..78c0d89 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1402,6 +1402,11 @@ initsocket() if (PySocket_Error == NULL || PyDict_SetItemString(d, "error", PySocket_Error) != 0) Py_FatalError("can't define socket.error"); + PySocketSock_Type.ob_type = &PyType_Type; + Py_INCREF(&PySocketSock_Type); + if (PyDict_SetItemString(d, "socket_type", + (PyObject *)&PySocketSock_Type) != 0) + Py_FatalError("can't define socket.socket_type"); insint(d, "AF_INET", AF_INET); #ifdef AF_UNIX insint(d, "AF_UNIX", AF_UNIX); |