summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-02-05 11:15:00 (GMT)
committerGuido van Rossum <guido@python.org>1992-02-05 11:15:00 (GMT)
commit3c8ba7a1eac574a6377e3c1642fb96c32cfca073 (patch)
tree4dd4c1a34f34454bb4740e7af63b18182f88adb9 /Modules
parent862c6f1046a0372269eb66d72b0498d05353f6eb (diff)
downloadcpython-3c8ba7a1eac574a6377e3c1642fb96c32cfca073.zip
cpython-3c8ba7a1eac574a6377e3c1642fb96c32cfca073.tar.gz
cpython-3c8ba7a1eac574a6377e3c1642fb96c32cfca073.tar.bz2
Fixed getargs() call in setfont.
Improved setwincursor() to allow None to explicitly turn the cursor off.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/stdwinmodule.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/Modules/stdwinmodule.c b/Modules/stdwinmodule.c
index 5556f03..d3ecfb8 100644
--- a/Modules/stdwinmodule.c
+++ b/Modules/stdwinmodule.c
@@ -612,7 +612,7 @@ drawing_setfont(self, args)
char style = '\0';
int size = 0;
if (args == NULL || !is_tupleobject(args)) {
- if (!getargs(args, "z", font))
+ if (!getargs(args, "z", &font))
return NULL;
}
else {
@@ -1596,12 +1596,16 @@ window_setwincursor(self, args)
{
char *name;
CURSOR *c;
- if (!getstrarg(args, &name))
- return NULL;
- c = wfetchcursor(name);
- if (c == NULL) {
- err_setstr(StdwinError, "no such cursor");
+ if (!getargs(args, "z", &name))
return NULL;
+ if (name == NULL)
+ c = NULL;
+ else {
+ c = wfetchcursor(name);
+ if (c == NULL) {
+ err_setstr(StdwinError, "no such cursor");
+ return NULL;
+ }
}
wsetwincursor(self->w_win, c);
INCREF(None);