summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-09-29 09:50:09 (GMT)
committerGuido van Rossum <guido@python.org>1994-09-29 09:50:09 (GMT)
commit14ed0b2cd3d814874b7ce03201fd4b634dbec63e (patch)
treef8d466be2ad5f1da7ed12141cf90f9a96a265c82 /Modules/socketmodule.c
parent180d7b4d5588737601b3242d8ce9cab59a75286f (diff)
downloadcpython-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.c12
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);
}