From 2794c885d8678c45380c8f1cfb2ff6e8334e6888 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 31 Jul 2025 13:46:29 -0400 Subject: [PATCH] MT#63317 add inline q_free and rename str_q_free to avoid clash Change-Id: I0ff141c2cbe3284c4a3662a17bf201ee14c25fe8 --- lib/containers.h | 3 +++ recording-daemon/types.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/containers.h b/lib/containers.h index f87673052..19f3d83e8 100644 --- a/lib/containers.h +++ b/lib/containers.h @@ -220,6 +220,9 @@ static inline void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) { } \ static inline void type_name##_q_clear(type_name##_q *q) { \ g_queue_clear(&q->q); \ + } \ + static inline void type_name##_q_free(type_name##_q *q) { \ + g_queue_free(&q->q); \ } #define TYPED_GQUEUE_INIT { .q = G_QUEUE_INIT } diff --git a/recording-daemon/types.h b/recording-daemon/types.h index 7071b7b35..8d3e2cfda 100644 --- a/recording-daemon/types.h +++ b/recording-daemon/types.h @@ -136,11 +136,11 @@ struct tag_s { typedef struct tag_s tag_t; -INLINE void str_q_free(str_q *q) { +INLINE void allocd_str_q_free(str_q *q) { t_queue_clear_full(q, str_free); t_queue_free(q); } -TYPED_GHASHTABLE(metadata_ht, str, str_q, str_hash, str_equal, str_free, str_q_free) +TYPED_GHASHTABLE(metadata_ht, str, str_q, str_hash, str_equal, str_free, allocd_str_q_free) struct metafile_s {