Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 1915:80818c106e3e legacy-trunk
* Modules/xxmodule.c: integrated with xxobject.c by Jack
* Modules/(posix,socket}module.c: more NT changes
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 29 Sep 1994 09:50:09 +0000 |
| parents | 758c1374f303 |
| children | 84637cfdbc07 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Thu Sep 29 09:45:57 1994 +0000 +++ b/Modules/socketmodule.c Thu Sep 29 09:50:09 1994 +0000 @@ -153,6 +153,18 @@ static object * socket_error() { +#ifdef NT + if (WSAGetLastError()) { + object *v; + v = mkvalue("(is)", WSAGetLastError(), "winsock error"); + if (v != NULL) { + err_setval(SocketError, v); + DECREF(v); + } + return NULL; + } + else +#endif return err_errno(SocketError); }
