From ad4cef0f3726e01d2b137cb05faa22f30ee444ae Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 4 Feb 2013 10:07:54 -0500 Subject: [PATCH] g_hash_table_contains implementation for old glib version --- daemon/aux.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daemon/aux.h b/daemon/aux.h index e61f52e9f..ab2c3e6f8 100644 --- a/daemon/aux.h +++ b/daemon/aux.h @@ -60,6 +60,12 @@ void g_string_vprintf(GString *string, const gchar *format, va_list args); void g_queue_clear(GQueue *); #endif +#if !GLIB_CHECK_VERSION(2,32,0) +static inline int g_hash_table_contains(GHashTable *h, const void *k) { + return g_hash_table_lookup(h, k) ? 1 : 0; +} +#endif + static inline void strmove(char **d, char **s) { if (*d)