diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2013-01-15 13:22:25 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2013-01-15 13:22:25 +0400 |
commit | 2b30549c493d7b67fa92c2b4bcd2bd2e55210ae1 (patch) | |
tree | ac4cc77344b3285eb47d5145eb0b28dd6034f54d /src/ftfont.c | |
parent | 1b971ac155006504b6b1c2688199747f976723af (diff) | |
download | emacs-2b30549c493d7b67fa92c2b4bcd2bd2e55210ae1.tar.gz |
* src/lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow extraction
from any Lisp_Save_Value slot. Add type checking.
* src/alloc.c, src/dired.c, src/editfns.c, src/fileio.c, src/ftfont.c:
* src/gtkutil.c, src/keymap.c, src/lread.c, src/nsterm.h, src/nsmenu.c:
* src/xfns.c, src/xmenu.c, src/xselect.c: All users changed.
* admin/coccinelle/xsave.cocci: Semantic patch to adjust users of
XSAVE_POINTER and XSAVE_INTEGER macros.
Diffstat (limited to 'src/ftfont.c')
-rw-r--r-- | src/ftfont.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index 1d7678bfe09..5bf91832c7c 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -400,7 +400,7 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for) else { val = XCDR (cache); - cache_data = XSAVE_POINTER (val); + cache_data = XSAVE_POINTER (val, 0); } if (cache_for == FTFONT_CACHE_FOR_ENTITY) @@ -466,7 +466,7 @@ ftfont_get_fc_charset (Lisp_Object entity) cache = ftfont_lookup_cache (entity, FTFONT_CACHE_FOR_CHARSET); val = XCDR (cache); - cache_data = XSAVE_POINTER (val); + cache_data = XSAVE_POINTER (val, 0); return cache_data->fc_charset; } @@ -1198,9 +1198,9 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) filename = XCAR (val); idx = XCDR (val); val = XCDR (cache); - cache_data = XSAVE_POINTER (XCDR (cache)); + cache_data = XSAVE_POINTER (XCDR (cache), 0); ft_face = cache_data->ft_face; - if (XSAVE_INTEGER (val) > 0) + if (XSAVE_INTEGER (val, 1) > 0) { /* FT_Face in this cache is already used by the different size. */ if (FT_New_Size (ft_face, &ft_size) != 0) @@ -1211,13 +1211,13 @@ ftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) return Qnil; } } - XSAVE_INTEGER (val)++; + XSAVE_INTEGER (val, 1)++; size = XINT (AREF (entity, FONT_SIZE_INDEX)); if (size == 0) size = pixel_size; if (FT_Set_Pixel_Sizes (ft_face, size, size) != 0) { - if (XSAVE_INTEGER (val) == 0) + if (XSAVE_INTEGER (val, 1) == 0) FT_Done_Face (ft_face); return Qnil; } @@ -1326,10 +1326,10 @@ ftfont_close (FRAME_PTR f, struct font *font) cache = ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE); eassert (CONSP (cache)); val = XCDR (cache); - (XSAVE_INTEGER (val))--; - if (XSAVE_INTEGER (val) == 0) + XSAVE_INTEGER (val, 1)--; + if (XSAVE_INTEGER (val, 1) == 0) { - struct ftfont_cache_data *cache_data = XSAVE_POINTER (val); + struct ftfont_cache_data *cache_data = XSAVE_POINTER (val, 0); FT_Done_Face (cache_data->ft_face); #ifdef HAVE_LIBOTF |