You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
5 years ago
|
From d02894ce9d1a88f103203684fc6d9f7ab87ceafa Mon Sep 17 00:00:00 2001
|
||
|
From: Jakub Filak <jfilak@redhat.com>
|
||
|
Date: Thu, 11 Sep 2014 12:30:43 +0200
|
||
|
Subject: [LIBREPORT PATCH 64/93] lib: add wrapper for g_hash_table_size()
|
||
|
|
||
|
Related to rhbz#1140224
|
||
|
|
||
|
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||
|
---
|
||
|
src/include/libreport_types.h | 9 +++++++++
|
||
|
1 file changed, 9 insertions(+)
|
||
|
|
||
|
diff --git a/src/include/libreport_types.h b/src/include/libreport_types.h
|
||
|
index d61c2e7..41ed5d7 100644
|
||
|
--- a/src/include/libreport_types.h
|
||
|
+++ b/src/include/libreport_types.h
|
||
|
@@ -33,6 +33,15 @@ typedef GHashTable map_string_t;
|
||
|
map_string_t *new_map_string(void);
|
||
|
#define free_map_string libreport_free_map_string
|
||
|
void free_map_string(map_string_t *ms);
|
||
|
+#define size_map_string libreport_size_map_string
|
||
|
+static inline
|
||
|
+unsigned size_map_string(map_string_t *ms)
|
||
|
+{
|
||
|
+ if (ms == NULL)
|
||
|
+ return 0;
|
||
|
+
|
||
|
+ return g_hash_table_size(ms);
|
||
|
+}
|
||
|
#define insert_map_string_item libreport_insert_map_string_item
|
||
|
static inline
|
||
|
void insert_map_string(map_string_t *ms, char *key, char *value)
|
||
|
--
|
||
|
1.8.3.1
|
||
|
|