Blame SOURCES/0064-lib-add-wrapper-for-g_hash_table_size.patch

4b6aa8
From d02894ce9d1a88f103203684fc6d9f7ab87ceafa Mon Sep 17 00:00:00 2001
4b6aa8
From: Jakub Filak <jfilak@redhat.com>
4b6aa8
Date: Thu, 11 Sep 2014 12:30:43 +0200
4b6aa8
Subject: [LIBREPORT PATCH 64/93] lib: add wrapper for g_hash_table_size()
4b6aa8
4b6aa8
Related to rhbz#1140224
4b6aa8
4b6aa8
Signed-off-by: Jakub Filak <jfilak@redhat.com>
4b6aa8
---
4b6aa8
 src/include/libreport_types.h | 9 +++++++++
4b6aa8
 1 file changed, 9 insertions(+)
4b6aa8
4b6aa8
diff --git a/src/include/libreport_types.h b/src/include/libreport_types.h
4b6aa8
index d61c2e7..41ed5d7 100644
4b6aa8
--- a/src/include/libreport_types.h
4b6aa8
+++ b/src/include/libreport_types.h
4b6aa8
@@ -33,6 +33,15 @@ typedef GHashTable map_string_t;
4b6aa8
 map_string_t *new_map_string(void);
4b6aa8
 #define free_map_string libreport_free_map_string
4b6aa8
 void free_map_string(map_string_t *ms);
4b6aa8
+#define size_map_string libreport_size_map_string
4b6aa8
+static inline
4b6aa8
+unsigned size_map_string(map_string_t *ms)
4b6aa8
+{
4b6aa8
+    if (ms == NULL)
4b6aa8
+        return 0;
4b6aa8
+
4b6aa8
+    return g_hash_table_size(ms);
4b6aa8
+}
4b6aa8
 #define insert_map_string_item libreport_insert_map_string_item
4b6aa8
 static inline
4b6aa8
 void insert_map_string(map_string_t *ms, char *key, char *value)
4b6aa8
-- 
4b6aa8
1.8.3.1
4b6aa8