diff options
author | Guido van Rossum <guido@python.org> | 1994-09-29 09:50:09 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-09-29 09:50:09 (GMT) |
commit | 14ed0b2cd3d814874b7ce03201fd4b634dbec63e (patch) | |
tree | f8d466be2ad5f1da7ed12141cf90f9a96a265c82 /Modules/socketmodule.c | |
parent | 180d7b4d5588737601b3242d8ce9cab59a75286f (diff) | |
download | cpython-14ed0b2cd3d814874b7ce03201fd4b634dbec63e.zip cpython-14ed0b2cd3d814874b7ce03201fd4b634dbec63e.tar.gz cpython-14ed0b2cd3d814874b7ce03201fd4b634dbec63e.tar.bz2 |
* Modules/xxmodule.c: integrated with xxobject.c by Jack
* Modules/(posix,socket}module.c: more NT changes
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 6f50fc3..82250ee 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -153,6 +153,18 @@ static object *SocketError; 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); } |