aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/alloc.c b/src/alloc.c
index aeda42637cd..022d1e5dcbb 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2874,10 +2874,22 @@ vector_nbytes (struct Lisp_Vector *v)
2874static void 2874static void
2875cleanup_vector (struct Lisp_Vector *vector) 2875cleanup_vector (struct Lisp_Vector *vector)
2876{ 2876{
2877 if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_FONT) 2877 if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_FONT))
2878 && ((vector->header.size & PSEUDOVECTOR_SIZE_MASK) 2878 {
2879 == FONT_OBJECT_MAX)) 2879 ptrdiff_t size = vector->header.size & PSEUDOVECTOR_SIZE_MASK;
2880 ((struct font *) vector)->driver->close ((struct font *) vector); 2880 Lisp_Object obj = make_lisp_ptr (vector, Lisp_Vectorlike);
2881
2882 if (size == FONT_OBJECT_MAX)
2883 font_close_object (obj);
2884#ifdef HAVE_NS
2885 else if (size == FONT_ENTITY_MAX)
2886 {
2887 struct font_entity *entity = (struct font_entity *) vector;
2888 if (entity->driver && entity->driver->free_entity)
2889 entity->driver->free_entity (obj);
2890 }
2891#endif /* HAVE_NS */
2892 }
2881} 2893}
2882 2894
2883/* Reclaim space used by unmarked vectors. */ 2895/* Reclaim space used by unmarked vectors. */