Browse Source

MT#55283 compile fix for older glib

by moving the glib helper into containers.h

Change-Id: I09bba2343cbbbaf4f9aba7fc89740d4fa6280927
pull/1848/head
Richard Fuchs 1 year ago
parent
commit
a46822ff25
2 changed files with 7 additions and 7 deletions
  1. +0
    -7
      lib/auxlib.h
  2. +7
    -0
      lib/containers.h

+ 0
- 7
lib/auxlib.h View File

@ -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 ***/


+ 7
- 0
lib/containers.h View File

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


Loading…
Cancel
Save