]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix window.setfont() to call drawing_setfont internally.
authorGuido van Rossum <guido@python.org>
Thu, 4 Apr 1991 17:26:32 +0000 (17:26 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 4 Apr 1991 17:26:32 +0000 (17:26 +0000)
Modules/stdwinmodule.c

index e00fc91c334e4e148f1b1e09ca1e7c88af13c7e2..0a572e457e07bd2d9cc468070b0390cc9862b3f8 100644 (file)
@@ -1329,19 +1329,16 @@ window_setfont(self, args)
        windowobject *self;
        object *args;
 {
+       object *v;
        TEXTATTR saveattr, winattr;
-       object *str;
-       if (!getstrarg(args, &str))
-               return NULL;
        wgettextattr(&saveattr);
        wgetwintextattr(self->w_win, &winattr);
        wsettextattr(&winattr);
-       wsetfont(getstringvalue(str));
+       v = drawing_setfont((drawingobject *)NULL, args);
        wgettextattr(&winattr);
        wsetwintextattr(self->w_win, &winattr);
        wsettextattr(&saveattr);
-       INCREF(None);
-       return None;
+       return v;
 }
 
 static struct methodlist window_methods[] = {