summaryrefslogtreecommitdiff
path: root/src/font.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2015-12-29 21:39:08 -0800
committerJohn Wiegley <johnw@newartisans.com>2015-12-29 21:39:08 -0800
commitec0a80cc283badc7f7fd5ef78512dde6d34b1355 (patch)
tree7190e0fb3d4aa06018d8cf997f06b806fb09a9c8 /src/font.h
parentd259328fb87db8cc67d52771efcfa653e52c5b71 (diff)
parente823c34072bf045800d91e12c7ddb61fa23c6e30 (diff)
downloademacs-25-merge.tar.gz
Merge emacs-25 into master (using imerge)emacs-25-merge
Diffstat (limited to 'src/font.h')
-rw-r--r--src/font.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/font.h b/src/font.h
index 1d13e1cb6b0..24c058dd88b 100644
--- a/src/font.h
+++ b/src/font.h
@@ -427,6 +427,13 @@ FONT_SPEC_P (Lisp_Object x)
return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_SPEC_MAX;
}
+/* Like FONT_SPEC_P, but can be used in the garbage collector. */
+INLINE bool
+GC_FONT_SPEC_P (Lisp_Object x)
+{
+ return FONTP (x) && (gc_asize (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_SPEC_MAX;
+}
+
/* True iff X is font-entity. */
INLINE bool
FONT_ENTITY_P (Lisp_Object x)
@@ -434,6 +441,13 @@ FONT_ENTITY_P (Lisp_Object x)
return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_ENTITY_MAX;
}
+/* Like FONT_ENTITY_P, but can be used in the garbage collector. */
+INLINE bool
+GC_FONT_ENTITY_P (Lisp_Object x)
+{
+ return FONTP (x) && (gc_asize (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_ENTITY_MAX;
+}
+
/* True iff X is font-object. */
INLINE bool
FONT_OBJECT_P (Lisp_Object x)
@@ -441,6 +455,13 @@ FONT_OBJECT_P (Lisp_Object x)
return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX;
}
+/* Like FONT_OBJECT_P, but can be used in the garbage collector. */
+INLINE bool
+GC_FONT_OBJECT_P (Lisp_Object x)
+{
+ return FONTP (x) && (gc_asize (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX;
+}
+
/* Type checking functions for various font-related objects. */
INLINE void
@@ -476,6 +497,13 @@ XFONT_SPEC (Lisp_Object p)
return XUNTAG (p, Lisp_Vectorlike);
}
+INLINE struct font_spec *
+GC_XFONT_SPEC (Lisp_Object p)
+{
+ eassert (GC_FONT_SPEC_P (p));
+ return XUNTAG (p, Lisp_Vectorlike);
+}
+
INLINE struct font_entity *
XFONT_ENTITY (Lisp_Object p)
{
@@ -483,6 +511,13 @@ XFONT_ENTITY (Lisp_Object p)
return XUNTAG (p, Lisp_Vectorlike);
}
+INLINE struct font_entity *
+GC_XFONT_ENTITY (Lisp_Object p)
+{
+ eassert (GC_FONT_ENTITY_P (p));
+ return XUNTAG (p, Lisp_Vectorlike);
+}
+
INLINE struct font *
XFONT_OBJECT (Lisp_Object p)
{
@@ -490,6 +525,13 @@ XFONT_OBJECT (Lisp_Object p)
return XUNTAG (p, Lisp_Vectorlike);
}
+INLINE struct font *
+GC_XFONT_OBJECT (Lisp_Object p)
+{
+ eassert (GC_FONT_OBJECT_P (p));
+ return XUNTAG (p, Lisp_Vectorlike);
+}
+
#define XSETFONT(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FONT))
INLINE struct font *