From fdb396e222923dc98d46c170381c6b33dc1e8d99 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Thu, 1 Aug 2013 14:33:25 +0400 Subject: Avoid redundant Lisp_Object <-> struct frame conversions in font API. * font.h (struct font_driver): Change list, match, and list_family functions to accept struct frame * as first arg. * font.c (font_score, font_compare, font_sort_entities): Remove prototypes. (font_sort_entities, font_list_entities, font_select_entity): (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to match font API change. * xfont.c (xfont_list, xfont_match, xfont_list_family): * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family): * ftxfont.c (ftxfont_list, ftxfont_match): * xftfont.c (xftfont_list, xftfont_match): * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family): * w32font.c (w32font_list, w32font_match, w32font_list): (w32font_list_internal, w32_font_match_internal): Likewise. * xfaces.c (Fx_family_fonts): Adjust user. --- src/xftfont.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xftfont.c') diff --git a/src/xftfont.c b/src/xftfont.c index 166a70acd85..5757a4d20f7 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -139,9 +139,9 @@ xftfont_get_colors (FRAME_PTR f, struct face *face, GC gc, struct xftface_info * struct font_driver xftfont_driver; static Lisp_Object -xftfont_list (Lisp_Object frame, Lisp_Object spec) +xftfont_list (struct frame *f, Lisp_Object spec) { - Lisp_Object list = ftfont_driver.list (frame, spec), tail; + Lisp_Object list = ftfont_driver.list (f, spec), tail; for (tail = list; CONSP (tail); tail = XCDR (tail)) ASET (XCAR (tail), FONT_TYPE_INDEX, Qxft); @@ -149,9 +149,9 @@ xftfont_list (Lisp_Object frame, Lisp_Object spec) } static Lisp_Object -xftfont_match (Lisp_Object frame, Lisp_Object spec) +xftfont_match (struct frame *f, Lisp_Object spec) { - Lisp_Object entity = ftfont_driver.match (frame, spec); + Lisp_Object entity = ftfont_driver.match (f, spec); if (! NILP (entity)) ASET (entity, FONT_TYPE_INDEX, Qxft); -- cgit v1.2.1