[Python-checkins] python/dist/src/Modules selectmodule.c,2.59.6.1,2.59.6.2
theller@users.sourceforge.net
theller@users.sourceforge.net
Tue, 24 Sep 2002 10:24:28 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv31154
Modified Files:
Tag: release22-maint
selectmodule.c
Log Message:
backport of the checkin of revision 2.69 of selectmodule.c
On Windows, call WSAGetLastError() to retrieve the error number.
Bugfix candidate, will backport to release22-maint myself.
Index: selectmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v
retrieving revision 2.59.6.1
retrieving revision 2.59.6.2
diff -C2 -d -r2.59.6.1 -r2.59.6.2
*** selectmodule.c 12 Jan 2002 11:13:23 -0000 2.59.6.1
--- selectmodule.c 24 Sep 2002 17:24:25 -0000 2.59.6.2
***************
*** 269,275 ****
--- 269,282 ----
Py_END_ALLOW_THREADS
+ #ifdef MS_WINDOWS
+ if (n == SOCKET_ERROR) {
+ errno = WSAGetLastError();
+ PyErr_SetFromErrno(SelectError);
+ }
+ #else
if (n < 0) {
PyErr_SetFromErrno(SelectError);
}
+ #endif
else if (n == 0) {
/* optimization */