summaryrefslogtreecommitdiffstats
path: root/Modules/stdwinmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-06-23 09:07:03 (GMT)
committerGuido van Rossum <guido@python.org>1992-06-23 09:07:03 (GMT)
commited233a56963233bbd646fdac01e55c9fdec50a30 (patch)
tree590cee6874280421f9288568015bf9b30326b8ed /Modules/stdwinmodule.c
parent5dc8eb0914a6fcea604a6626af9e63120e84b527 (diff)
downloadcpython-ed233a56963233bbd646fdac01e55c9fdec50a30.zip
cpython-ed233a56963233bbd646fdac01e55c9fdec50a30.tar.gz
cpython-ed233a56963233bbd646fdac01e55c9fdec50a30.tar.bz2
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.
Diffstat (limited to 'Modules/stdwinmodule.c')
-rw-r--r--Modules/stdwinmodule.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/stdwinmodule.c b/Modules/stdwinmodule.c
index f81351d..4d2b48f 100644
--- a/Modules/stdwinmodule.c
+++ b/Modules/stdwinmodule.c
@@ -2102,11 +2102,27 @@ stdwin_getscrmm(self, args)
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},