From db46c0e4f8427b38bad01d8a7a07e27e15f44b95 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 4 Apr 1991 17:26:32 +0000 Subject: [PATCH] Fix window.setfont() to call drawing_setfont internally. --- Modules/stdwinmodule.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Modules/stdwinmodule.c b/Modules/stdwinmodule.c index e00fc91c334..0a572e457e0 100644 --- a/Modules/stdwinmodule.c +++ b/Modules/stdwinmodule.c @@ -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[] = {