Skip to content

Commit

Permalink
MT#55283 compile fix for older glib
Browse files Browse the repository at this point in the history
by moving the glib helper into containers.h

Change-Id: I09bba2343cbbbaf4f9aba7fc89740d4fa6280927
  • Loading branch information
rfuchs committed Aug 5, 2024
1 parent 666fbc3 commit a46822f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/auxlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,6 @@ INLINE gboolean g_hash_table_steal_extended(GHashTable *ht, gconstpointer lookup
}
#endif

#if !(GLIB_CHECK_VERSION(2,60,0))
INLINE void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) {
void *p;
while ((p = g_queue_pop_head(q)))
free_func(p);
}
#endif


/*** MISC ***/
Expand Down
7 changes: 7 additions & 0 deletions lib/containers.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
#include <glib.h>
#include <assert.h>

#if !(GLIB_CHECK_VERSION(2,60,0))
static inline void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) {
void *p;
while ((p = g_queue_pop_head(q)))
free_func(p);
}
#endif

#define TYPED_GHASHTABLE_PROTO(type_name, key_type, value_type) \
typedef union { \
Expand Down

0 comments on commit a46822f

Please sign in to comment.