diff options
author | Guido van Rossum <guido@python.org> | 1993-06-17 12:35:49 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-06-17 12:35:49 (GMT) |
commit | 234f942aefb779efa6cfb7225e21d16a3f7e80f7 (patch) | |
tree | 9c85e1ae919ebb44c0a1ca48bdfd11d5f60c7d9c /Modules/stdwinmodule.c | |
parent | 6a0e2282c359801bd70742642d24f7b0b74f5b4e (diff) | |
download | cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.zip cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.tar.gz cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.tar.bz2 |
* Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.
Added $(SYSDEF) to its build rule in Makefile.
* cgensupport.[ch], modsupport.[ch]: removed some old stuff. Also
changed files that still used it... And made several things static
that weren't but should have been... And other minor cleanups...
* listobject.[ch]: add external interfaces {set,get}listslice
* socketmodule.c: fix bugs in new send() argument parsing.
* sunaudiodevmodule.c: added flush() and close().
Diffstat (limited to 'Modules/stdwinmodule.c')
-rw-r--r-- | Modules/stdwinmodule.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Modules/stdwinmodule.c b/Modules/stdwinmodule.c index 02f7bcb..6e666a6 100644 --- a/Modules/stdwinmodule.c +++ b/Modules/stdwinmodule.c @@ -91,6 +91,15 @@ static type_lock StdwinLock; /* Lock held when interpreter not locked */ #endif +#define getpointarg(v, a) getargs(v, "(ii)", a, (a)+1) +#define get3pointarg(v, a) getargs(v, "((ii)(ii)(ii))", \ + a, a+1, a+2, a+3, a+4, a+5) +#define getrectarg(v, a) getargs(v, "((ii)(ii))", a, a+1, a+2, a+3) +#define getrectintarg(v, a) getargs(v, "(((ii)(ii))i)", a, a+1, a+2, a+3, a+4) +#define getpointintarg(v, a) getargs(v, "((ii)i)", a, a+1, a+2) +#define getrectpointarg(v, a) getargs(v, "(((ii)(ii))(ii))", \ + a, a+1, a+2, a+3, a+4, a+5) + static object *StdwinError; /* Exception stdwin.error */ /* Window and menu object types declared here because of forward references */ @@ -1236,7 +1245,7 @@ menu_setitem(self, args) { int index; char *text; - if (!getintstrarg(args, &index, &text)) + if (!getargs(args, "(is)", &index, &text)) return NULL; wmenusetitem(self->m_menu, index, text); INCREF(None); @@ -1250,7 +1259,7 @@ menu_enable(self, args) { int index; int flag; - if (!getintintarg(args, &index, &flag)) + if (!getargs(args, "(ii)", &index, &flag)) return NULL; wmenuenable(self->m_menu, index, flag); INCREF(None); @@ -1264,7 +1273,7 @@ menu_check(self, args) { int index; int flag; - if (!getintintarg(args, &index, &flag)) + if (!getargs(args, "(ii)", &index, &flag)) return NULL; wmenucheck(self->m_menu, index, flag); INCREF(None); @@ -1705,7 +1714,7 @@ window_settitle(wp, args) object *args; { object *title; - if (!getStrarg(args, &title)) + if (!getargs(args, "S", &title)) return NULL; DECREF(wp->w_title); INCREF(title); @@ -1930,7 +1939,7 @@ stdwin_open(sw, args) int tag; object *title; windowobject *wp; - if (!getStrarg(args, &title)) + if (!getargs(args, "S", &title)) return NULL; for (tag = 0; tag < MAXNWIN; tag++) { if (windowlist[tag] == NULL) @@ -2180,7 +2189,7 @@ stdwin_askfile(self, args) char *prompt, *dflt; int new, ret; char buf[256]; - if (!getstrstrintarg(args, &prompt, &dflt, &new)) + if (!getargs(args, "(ssi)", &prompt, &dflt, &new)) return NULL; strncpy(buf, dflt, sizeof buf); buf[sizeof buf - 1] = '\0'; @@ -2201,7 +2210,7 @@ stdwin_askync(self, args) { char *prompt; int new, ret; - if (!getstrintarg(args, &prompt, &new)) + if (!getargs(args, "(si)", &prompt, &new)) return NULL; BGN_STDWIN ret = waskync(prompt, new); @@ -2221,7 +2230,7 @@ stdwin_askstr(self, args) char *prompt, *dflt; int ret; char buf[256]; - if (!getstrstrarg(args, &prompt, &dflt)) + if (!getargs(args, "(ss)", &prompt, &dflt)) return NULL; strncpy(buf, dflt, sizeof buf); buf[sizeof buf - 1] = '\0'; |