Use mono_object_hash() for hashes with object keys.
authorMark Probst <mark.probst@gmail.com>
Tue, 26 May 2009 16:59:24 +0000 (16:59 -0000)
committerMark Probst <mark.probst@gmail.com>
Tue, 26 May 2009 16:59:24 +0000 (16:59 -0000)
2009-05-26  Mark Probst  <mark.probst@gmail.com>

        * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
        for the hashes whose keys are managed objects.

svn path=/trunk/mono/; revision=134778

mono/metadata/ChangeLog
mono/metadata/reflection.c

index 5c614d742afd0657adddb5372619739155397a03..ae8e38527bb5dcd8e85bfe2584ca6cf5cc20c6dd 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-26  Mark Probst  <mark.probst@gmail.com>
+
+       * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
+       for the hashes whose keys are managed objects.
+
 2009-05-26  Mark Probst  <mark.probst@gmail.com>
 
        * object-internals.h, threads.c: Set the execution context on
index a3b4fb6d5bd2288b9b5e6a89411ac9542c9a334a..ff00dd085518d7d9bdccc009768a5526f1cc731b 100644 (file)
@@ -4771,14 +4771,14 @@ create_dynamic_mono_image (MonoDynamicAssembly *assembly, char *assembly_name, c
 
        mono_image_init (&image->image);
 
-       image->token_fixups = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_KEY_GC);
+       image->token_fixups = mono_g_hash_table_new_type (mono_object_hash, NULL, MONO_HASH_KEY_GC);
        image->method_to_table_idx = g_hash_table_new (NULL, NULL);
        image->field_to_table_idx = g_hash_table_new (NULL, NULL);
        image->method_aux_hash = g_hash_table_new (NULL, NULL);
        image->handleref = g_hash_table_new (NULL, NULL);
        image->tokens = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_VALUE_GC);
        image->generic_def_objects = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_VALUE_GC);
-       image->methodspec = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_KEY_GC);
+       image->methodspec = mono_g_hash_table_new_type (mono_object_hash, NULL, MONO_HASH_KEY_GC);
        image->typespec = g_hash_table_new ((GHashFunc)mono_metadata_type_hash, (GCompareFunc)mono_metadata_type_equal);
        image->typeref = g_hash_table_new ((GHashFunc)mono_metadata_type_hash, (GCompareFunc)mono_metadata_type_equal);
        image->blob_cache = g_hash_table_new ((GHashFunc)mono_blob_entry_hash, (GCompareFunc)mono_blob_entry_equal);