Mercurial > cpython-lru_cache-weakref
diff Modules/stdwinmodule.c @ 657:3e626c413bbf legacy-trunk
Fixed getargs() call in setfont.
Improved setwincursor() to allow None to explicitly turn the cursor off.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 05 Feb 1992 11:15:00 +0000 |
| parents | 784a09a52375 |
| children | 0cd197947d81 |
line wrap: on
line diff
--- a/Modules/stdwinmodule.c Wed Jan 29 14:47:05 1992 +0000 +++ b/Modules/stdwinmodule.c Wed Feb 05 11:15:00 1992 +0000 @@ -612,7 +612,7 @@ 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 @@ { char *name; CURSOR *c; - if (!getstrarg(args, &name)) + if (!getargs(args, "z", &name)) return NULL; - c = wfetchcursor(name); - if (c == NULL) { - err_setstr(StdwinError, "no such cursor"); - 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);
