Fix: headers: add missing end of `extern "C"` curly brackets (for C++)
[babeltrace.git] / include / babeltrace / compat / glib-internal.h
index dd03b19c8faa934f0521a4302dd1fcc2fe17bf69..e956280db4b6f8762501a2408323477952db19c6 100644 (file)
@@ -2,8 +2,6 @@
 #define _BABELTRACE_COMPAT_GLIB_H
 
 /*
- * babeltrace/compat/glib.h
- *
  * Copyright (C) 2015 Michael Jeanson <mjeanson@efficios.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -40,14 +38,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;
-
-       value = g_hash_table_lookup(hash_table, key);
-       if (value == NULL) {
-               return FALSE;
-       }
+       gpointer orig_key;
+       gpointer value;
 
-       return TRUE;
+       return g_hash_table_lookup_extended(hash_table, key, &orig_key,
+               &value);
 }
 
 #endif
This page took 0.034334 seconds and 4 git commands to generate.