Commit 4e67c0ce authored by Guido van Rossum's avatar Guido van Rossum

Fixed getargs() call in setfont.

Improved setwincursor() to allow None to explicitly turn the cursor off.
parent 89b37c14
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment