Add g_hash_table_get_keys() and g_hash_table_get_values(), API to retrieve

2007-04-11  Emmanuele Bassi  <ebassi@gnome.org>

	* glib/ghash.[ch]: Add g_hash_table_get_keys() and
	g_hash_table_get_values(), API to retrieve the keys
	and values inside an hash table in list form. (#413133)

	* glib/glib.symbols: Update symbols.

	* tests/hash-test.c: Exercise newly added functions.

svn path=/trunk/; revision=5444
This commit is contained in:
Emmanuele Bassi
2007-04-11 13:09:38 +00:00
committed by Emmanuele Bassi
parent e542f521ef
commit db8642a56c
5 changed files with 96 additions and 1 deletions

View File

@@ -28,6 +28,7 @@
#define __G_HASH_H__
#include <glib/gtypes.h>
#include <glib/glist.h>
G_BEGIN_DECLS
@@ -77,6 +78,8 @@ guint g_hash_table_foreach_steal (GHashTable *hash_table,
GHRFunc func,
gpointer user_data);
guint g_hash_table_size (GHashTable *hash_table);
GList * g_hash_table_get_keys (GHashTable *hash_table);
GList * g_hash_table_get_values (GHashTable *hash_table);
/* keeping hash tables alive */
GHashTable* g_hash_table_ref (GHashTable *hash_table);