Merge alpha100 branch back to main trunk

This commit is contained in:
Guido van Rossum 1994-08-01 11:34:53 +00:00
parent 2979b01ff8
commit b6775db241
176 changed files with 5302 additions and 3668 deletions

View file

@ -1,5 +1,5 @@
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
All Rights Reserved
@ -28,7 +28,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "modsupport.h"
#include "ceval.h"
#include "myselect.h"
#include <sys/types.h>
#include "myselect.h" /* Also includes mytime.h */
static object *SelectError;
@ -63,12 +64,13 @@ list2set(list, set, fd2obj)
err_badarg();
return -1;
}
if ( v >= FD_SETSIZE ) {
err_setstr(SystemError, "FD_SETSIZE too low in select()");
if ( v < 0 || v >= FD_SETSIZE ) {
err_setstr(ValueError, "filedescriptor out of range in select()");
return -1;
}
if ( v > max ) max = v;
FD_SET(v, set);
XDECREF(fd2obj[v]);
fd2obj[v] = o;
}
return max+1;
@ -91,11 +93,12 @@ set2list(set, max, fd2obj)
for(i=0; i<max; i++)
if ( FD_ISSET(i,set) ) {
if ( i > FD_SETSIZE ) {
err_setstr(SystemError, "FD_SETSIZE too low in select()");
err_setstr(SystemError,
"filedescriptor out of range returned in select()");
return NULL;
}
o = fd2obj[i];
if ( o == 0 ) {
if ( o == NULL ) {
err_setstr(SystemError,
"Bad filedescriptor returned from select()");
return NULL;