-/* Return 1 if category set of CH contains CATEGORY, elt return 0. */
-#define CHAR_HAS_CATEGORY(ch, category) \
- (_temp_category_set = CATEGORY_SET (ch), \
- CATEGORY_MEMBER (category, _temp_category_set))
+/* Return true if CATEGORY_SET contains CATEGORY.
+ Faster than '!NILP (Faref (category_set, make_number (category)))'. */
+INLINE bool
+CATEGORY_MEMBER (EMACS_INT category, Lisp_Object category_set)
+{
+ return bool_vector_bitref (category_set, category);
+}
+
+/* Return true if category set of CH contains CATEGORY. */
+INLINE bool
+CHAR_HAS_CATEGORY (int ch, int category)
+{
+ Lisp_Object category_set = CATEGORY_SET (ch);
+ return CATEGORY_MEMBER (category, category_set);
+}