X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fcompat%2Fglib-internal.h;h=fd253559e3284f9c7af4a632c8ae5331837ba350;hb=c2888a2b9f644c9da6fec019db4c44fe8cb6e3be;hp=dd03b19c8faa934f0521a4302dd1fcc2fe17bf69;hpb=ff205f0b502ed1f0c5f376ff9d48b4f2dcab18f3;p=babeltrace.git diff --git a/include/babeltrace/compat/glib-internal.h b/include/babeltrace/compat/glib-internal.h index dd03b19c..fd253559 100644 --- a/include/babeltrace/compat/glib-internal.h +++ b/include/babeltrace/compat/glib-internal.h @@ -40,14 +40,11 @@ bt_g_hash_table_contains(GHashTable *hash_table, gconstpointer key) static inline gboolean bt_g_hash_table_contains(GHashTable *hash_table, gconstpointer key) { - const char *value; + gpointer orig_key; + gpointer value; - value = g_hash_table_lookup(hash_table, key); - if (value == NULL) { - return FALSE; - } - - return TRUE; + return g_hash_table_lookup_extended(hash_table, key, &orig_key, + &value); } #endif