From 2198199a9fd983dcd6b5d1aa2758499e6f293e34 Mon Sep 17 00:00:00 2001 From: Wild Dragon Dev Date: Wed, 3 Jun 2026 20:11:14 +0000 Subject: [PATCH] fix: inline accessors in slot.h now that struct fc_slot is a complete type --- services/framecache/src/slot.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/framecache/src/slot.h b/services/framecache/src/slot.h index 27c3d27..32ee54f 100644 --- a/services/framecache/src/slot.h +++ b/services/framecache/src/slot.h @@ -68,11 +68,11 @@ typedef struct { _Static_assert(sizeof(fc_frame_t) == FC_FRAME_HDR_SIZE, "fc_frame_t header must be exactly FC_FRAME_HDR_SIZE bytes"); -/* Accessor function declarations (implemented in slot.c) */ -fc_header_t *fc_slot_header(struct fc_slot *s); -const char *fc_slot_id(struct fc_slot *s); -const char *fc_slot_shm_path(struct fc_slot *s); -const char *fc_slot_sem_name(struct fc_slot *s); +/* Accessor functions — inline now that struct fc_slot is defined above */ +static inline fc_header_t *fc_slot_header(struct fc_slot *s) { return (fc_header_t *)s->base; } +static inline const char *fc_slot_id(struct fc_slot *s) { return s->slot_id; } +static inline const char *fc_slot_shm_path(struct fc_slot *s) { return s->shm_path; } +static inline const char *fc_slot_sem_name(struct fc_slot *s) { return s->sem_name; } /** * Compute total shm size for a slot given frame_size.