2008-10-28 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / utils / mono-hash.h
index c76f7ca262064df6ed80f1ad257ae18c9c52ebe1..6ecaa6106488fba56207dc39037ffe0c8dbe13b3 100644 (file)
@@ -39,10 +39,24 @@ G_BEGIN_DECLS
 
 typedef struct _MonoGHashTable  MonoGHashTable;
 
+typedef gpointer (*MonoGRemapperFunc) (gpointer key, gpointer value, 
+                                                                          gpointer user_data);
+
+/* do not change the values of this enum */
+typedef enum {
+       MONO_HASH_CONSERVATIVE_GC,
+       MONO_HASH_KEY_GC,
+       MONO_HASH_VALUE_GC,
+       MONO_HASH_KEY_VALUE_GC /* note this is the OR of the other two values */
+} MonoGHashGCType;
+
 /* Hash tables
  */
 MonoGHashTable* mono_g_hash_table_new             (GHashFunc       hash_func,
                                            GEqualFunc      key_equal_func);
+MonoGHashTable* mono_g_hash_table_new_type                (GHashFunc       hash_func,
+                                           GEqualFunc      key_equal_func,
+                                           MonoGHashGCType type);
 MonoGHashTable* mono_g_hash_table_new_full                (GHashFunc       hash_func,
                                            GEqualFunc      key_equal_func,
                                            GDestroyNotify  key_destroy_func,
@@ -75,6 +89,10 @@ guint            mono_g_hash_table_foreach_steal        (MonoGHashTable         *hash_table,
                                            gpointer        user_data);
 guint      mono_g_hash_table_size                 (MonoGHashTable         *hash_table);
 
+void        mono_g_hash_table_remap (MonoGHashTable *hash_table,
+                                                                        MonoGRemapperFunc func,
+                                                                        gpointer user_data);
+
 G_END_DECLS
 
 #endif /* __MONO_G_HASH_H__ */