*
* Copyright 2013 Xamarin Inc (http://www.xamarin.com)
*/
-#include <glib.h>
-#include <mono/utils/mono-publib.h>
+
#ifndef __MONO_G_HASH_H__
#define __MONO_G_HASH_H__
+#include <mono/metadata/mono-gc.h>
+
MONO_BEGIN_DECLS
/* 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 */
+ MONO_HASH_KEY_GC = 1,
+ MONO_HASH_VALUE_GC = 2,
+ MONO_HASH_KEY_VALUE_GC = MONO_HASH_KEY_GC | MONO_HASH_VALUE_GC,
} MonoGHashGCType;
typedef struct _MonoGHashTable MonoGHashTable;
-MONO_API MonoGHashTable *mono_g_hash_table_new_type (GHashFunc hash_func, GEqualFunc key_equal_func, MonoGHashGCType type);
-MONO_API MonoGHashTable *mono_g_hash_table_new (GHashFunc hash_func, GEqualFunc key_equal_func);
-MONO_API MonoGHashTable *mono_g_hash_table_new_full (GHashFunc hash_func, GEqualFunc key_equal_func,
- GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func);
+MONO_API MonoGHashTable *mono_g_hash_table_new_type (GHashFunc hash_func, GEqualFunc key_equal_func, MonoGHashGCType type, MonoGCRootSource source, const char *msg);
MONO_API guint mono_g_hash_table_size (MonoGHashTable *hash);
MONO_API gpointer mono_g_hash_table_lookup (MonoGHashTable *hash, gconstpointer key);
MONO_API gboolean mono_g_hash_table_lookup_extended (MonoGHashTable *hash, gconstpointer key, gpointer *orig_key, gpointer *value);