Mercurial > cpython-lru_cache-weakref
diff Modules/stdwinmodule.c @ 902:a4793ae26682 legacy-trunk
Changes for new UNIX-specific built-in module 'select' and new header for
interfaces to variants of select() system call, "myselect.h". This includes
adding fileno() methods to files, sockets and stdwin.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 23 Jun 1992 09:07:03 +0000 |
| parents | e157c12cd6e7 |
| children | 32010d355fb6 |
line wrap: on
line diff
--- a/Modules/stdwinmodule.c Fri Jun 19 13:57:27 1992 +0000 +++ b/Modules/stdwinmodule.c Tue Jun 23 09:07:03 1992 +0000 @@ -2102,11 +2102,27 @@ return makepoint(width, height); } +#ifdef unix +static object * +stdwin_connectionnumber(self, args) + object *self; + object *args; +{ + if (!getnoarg(args)) + return NULL; + return newintobject((long) wconnectionnumber()); +} +#endif + static struct methodlist stdwin_methods[] = { {"askfile", stdwin_askfile}, {"askstr", stdwin_askstr}, {"askync", stdwin_askync}, {"fetchcolor", stdwin_fetchcolor}, +#ifdef unix + {"fileno", stdwin_connectionnumber}, + {"connectionnumber", stdwin_connectionnumber}, +#endif {"fleep", stdwin_fleep}, {"getactive", stdwin_getactive}, {"getcutbuffer", stdwin_getcutbuffer},
