Browse Source

MT#63317 add inline q_free

and rename str_q_free to avoid clash

Change-Id: I0ff141c2cbe3284c4a3662a17bf201ee14c25fe8
rfuchs/dtls-ice
Richard Fuchs 4 months ago
parent
commit
2794c885d8
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      lib/containers.h
  2. +2
    -2
      recording-daemon/types.h

+ 3
- 0
lib/containers.h View File

@ -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 }


+ 2
- 2
recording-daemon/types.h View File

@ -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 {


Loading…
Cancel
Save