-#if DISPATCH_DATA_USE_LEAF_MEMBER
-#define _dispatch_data_leaf(d) ((d)->leaf)
-#define _dispatch_data_num_records(d) ((d)->num_records)
-#else
-#define _dispatch_data_leaf(d) ((d)->num_records ? 0 : ((d)->size ? 1 : 0))
-#define _dispatch_data_num_records(d) \
- (_dispatch_data_leaf(d) ? 1 : (d)->num_records)
-#endif // DISPATCH_DATA_USE_LEAF_MEMBER
+DISPATCH_ALWAYS_INLINE
+static inline bool
+_dispatch_data_leaf(struct dispatch_data_s *dd)
+{
+ return dd->num_records == 0;
+}
+
+/*
+ * This is about the number of records required to hold that dispatch data
+ * if it's not a leaf. Callers either want that value, or have to special
+ * case the case when the dispatch data *is* a leaf before (and that the actual
+ * embedded record count of that dispatch data is 0)
+ */
+DISPATCH_ALWAYS_INLINE
+static inline size_t
+_dispatch_data_num_records(struct dispatch_data_s *dd)
+{
+ return dd->num_records ?: 1;
+}