From 3ccd0ff1064a2836c379b13c2d5f4b11c5da1f88 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Mon, 3 Apr 2017 08:42:18 +0200 Subject: Add PVSIZE function to return the size of a pseudovector. * src/lisp.h (PVSIZE): New function. * src/chartab.c (copy_char_table): * src/data.c (Ftype_of, Finteractive_form, Faref, Faset): * src/doc.c (Fdocumentation, store_function_docstring): * src/eval.c (Fcommandp, funcall_lambda, lambda_arity, Ffetch_bytecode): * src/fns.c (Flength, Fcopy_sequence): * src/font.h (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P): * src/lread.c (substitute_object_recurse): * src/src/print.c (print_object): Use it. --- src/font.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/font.h') diff --git a/src/font.h b/src/font.h index a469b20e4f4..53e3fc21a3d 100644 --- a/src/font.h +++ b/src/font.h @@ -424,7 +424,7 @@ FONTP (Lisp_Object x) INLINE bool FONT_SPEC_P (Lisp_Object x) { - return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_SPEC_MAX; + return FONTP (x) && PVSIZE (x) == FONT_SPEC_MAX; } /* Like FONT_SPEC_P, but can be used in the garbage collector. */ @@ -438,7 +438,7 @@ GC_FONT_SPEC_P (Lisp_Object x) INLINE bool FONT_ENTITY_P (Lisp_Object x) { - return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_ENTITY_MAX; + return FONTP (x) && PVSIZE (x) == FONT_ENTITY_MAX; } /* Like FONT_ENTITY_P, but can be used in the garbage collector. */ @@ -452,7 +452,7 @@ GC_FONT_ENTITY_P (Lisp_Object x) INLINE bool FONT_OBJECT_P (Lisp_Object x) { - return FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX; + return FONTP (x) && PVSIZE (x) == FONT_OBJECT_MAX; } /* Like FONT_OBJECT_P, but can be used in the garbage collector. */ -- cgit v1.2.1