Browse Source

MT#56374 move glib helper to auxlib

Needed by perf-tester

Change-Id: I9fcb68e48938a2060498bf30ff7ffbdd38c6d94b
pull/1759/head
Richard Fuchs 2 years ago
parent
commit
125657e108
2 changed files with 8 additions and 7 deletions
  1. +0
    -7
      include/helpers.h
  2. +8
    -0
      lib/auxlib.h

+ 0
- 7
include/helpers.h View File

@ -130,13 +130,6 @@ INLINE void g_queue_truncate(GQueue *q, unsigned int len) {
while (q->length > len)
g_queue_pop_tail(q);
}
#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
INLINE void g_queue_append(GQueue *dst, const GQueue *src) {
GList *l;
if (!src || !dst)


+ 8
- 0
lib/auxlib.h View File

@ -410,6 +410,14 @@ 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 ***/


Loading…
Cancel
Save