MT#56374 move glib helper to auxlib

Needed by perf-tester

Change-Id: I9fcb68e48938a2060498bf30ff7ffbdd38c6d94b
pull/1759/head
Richard Fuchs 2 years ago
parent 4c7809999f
commit 125657e108

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

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