Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 5572:b231855a9474 legacy-trunk
Add socket.socket_type, as discussed on c.l.p.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 21 May 1997 14:37:37 +0000 |
| parents | 84d3cca814fb |
| children | 88b0b2a3aab5 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Wed May 21 14:27:20 1997 +0000 +++ b/Modules/socketmodule.c Wed May 21 14:37:37 1997 +0000 @@ -1402,6 +1402,11 @@ 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);
