[grilo/debian: 18/23] core: Fix grl_data_has_key()
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo/debian: 18/23] core: Fix grl_data_has_key()
- Date: Sun, 6 Mar 2011 17:00:06 +0000 (UTC)
commit c4a83945824507f81402b038ebb1993dbae4de15
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Fri Mar 4 15:38:20 2011 +0000
core: Fix grl_data_has_key()
When searching for a key, take in account that there are related keys.
Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
src/data/grl-data.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/data/grl-data.c b/src/data/grl-data.c
index e5ed4bf..c6ae51b 100644
--- a/src/data/grl-data.c
+++ b/src/data/grl-data.c
@@ -531,9 +531,16 @@ grl_data_remove (GrlData *data, GrlKeyID key)
gboolean
grl_data_has_key (GrlData *data, GrlKeyID key)
{
+ GrlKeyID sample_key;
+
g_return_val_if_fail (GRL_IS_DATA (data), FALSE);
- return g_hash_table_lookup_extended (data->priv->data, key, NULL, NULL);
+ sample_key = get_sample_key (key);
+ if (!sample_key) {
+ return FALSE;
+ }
+
+ return g_hash_table_lookup_extended (data->priv->data, sample_key, NULL, NULL);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]