Mercurial > cpython-lru_cache-weakref
diff Modules/selectmodule.c @ 1392:0ffff40d13ff legacy-trunk
Fixed a couple of bugs: getargs doesn't use % escapes, and seconds
must be set after timeout is initialized.
| author | Sjoerd Mullender <sjoerd@acm.org> |
|---|---|
| date | Tue, 02 Nov 1993 15:34:23 +0000 |
| parents | cffe8d6b2f09 |
| children | 1940892d2fe3 |
line wrap: on
line diff
--- a/Modules/selectmodule.c Mon Nov 01 16:28:59 1993 +0000 +++ b/Modules/selectmodule.c Tue Nov 02 15:34:23 1993 +0000 @@ -125,12 +125,12 @@ /* Get args. Looks funny because of optional timeout argument */ if ( getargs(args, "(OOOO)", &ifdlist, &ofdlist, &efdlist, &tout) ) { - seconds = (int)timeout; if (tout == None) tvp = (struct timeval *)0; else { - if (!getargs(tout, "%d;timeout must be float or None", &timeout)) + if (!getargs(tout, "d;timeout must be float or None", &timeout)) return NULL; + seconds = (int)timeout; timeout = timeout - (double)seconds; tv.tv_sec = seconds; tv.tv_usec = (int)(timeout*1000000.0);
