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