summaryrefslogtreecommitdiff
path: root/src/font.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2015-01-16 15:15:32 +0300
committerDmitry Antipov <dmantipov@yandex.ru>2015-01-16 15:15:32 +0300
commit4303d11029cf204cbf4ddf917ee0d37b08130570 (patch)
tree5781c5e151aed74b7757a475de32190fdb58afcf /src/font.c
parent7ee2733f1ecd3d4f2bd782aa802b090c77fbb135 (diff)
downloademacs-4303d11029cf204cbf4ddf917ee0d37b08130570.tar.gz
Prefer INLINE functions in font.h to match style used in lisp.h
* font.h (FONTP, FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P) (CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT) (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, CHECK_FONT_GET_OBJECT): Now functions. * font.c (Ffont_otf_alternates, Fquery_font, Ffont_get_glyphs): * ftfont.c (ftfont_shape): * macfont.m (macfont_shape): * w32uniscribe.c (uniscribe_shape): * xftfont.c (xftfont_shape): Adjust CHECK_FONT_GET_OBJECT users.
Diffstat (limited to 'src/font.c')
-rw-r--r--src/font.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/font.c b/src/font.c
index 074e86687a1..56a27821718 100644
--- a/src/font.c
+++ b/src/font.c
@@ -4533,12 +4533,11 @@ character code corresponding to the glyph or nil if there's no
corresponding character. */)
(Lisp_Object font_object, Lisp_Object character, Lisp_Object otf_features)
{
- struct font *font;
+ struct font *font = CHECK_FONT_GET_OBJECT (font_object);
Lisp_Object gstring_in, gstring_out, g;
Lisp_Object alternates;
int i, num;
- CHECK_FONT_GET_OBJECT (font_object, font);
if (! font->driver->otf_drive)
error ("Font backend %s can't drive OpenType GSUB table",
SDATA (SYMBOL_NAME (font->driver->type)));
@@ -4648,12 +4647,9 @@ FEATURE is a symbol representing OpenType feature tag.
If the font is not OpenType font, CAPABILITY is nil. */)
(Lisp_Object font_object)
{
- struct font *font;
- Lisp_Object val;
+ struct font *font = CHECK_FONT_GET_OBJECT (font_object);
+ Lisp_Object val = make_uninit_vector (9);
- CHECK_FONT_GET_OBJECT (font_object, font);
-
- val = make_uninit_vector (9);
ASET (val, 0, AREF (font_object, FONT_NAME_INDEX));
ASET (val, 1, AREF (font_object, FONT_FILE_INDEX));
ASET (val, 2, make_number (font->pixel_size));
@@ -4692,12 +4688,11 @@ the corresponding element is nil. */)
(Lisp_Object font_object, Lisp_Object from, Lisp_Object to,
Lisp_Object object)
{
- struct font *font;
+ struct font *font = CHECK_FONT_GET_OBJECT (font_object);
ptrdiff_t i, len;
Lisp_Object *chars, vec;
USE_SAFE_ALLOCA;
- CHECK_FONT_GET_OBJECT (font_object, font);
if (NILP (object))
{
ptrdiff_t charpos, bytepos;