Author: miguel
Date: 2006-10-30 17:38:23 -0500 (Mon, 30 Oct 2006)
New Revision: 67154
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/tramp-x86.c
trunk/mono/mono/utils/ChangeLog
trunk/mono/mono/utils/mono-ehash.c
Log:
2006-10-18 Miguel de Icaza <[EMAIL PROTECTED]>
* mono-ehash.c (mono_g_hash_table_destroy): Use mg_free, not
g_free.
2006-10-30 Miguel de Icaza <[EMAIL PROTECTED]>
* tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2006-10-30 22:10:52 UTC (rev 67153)
+++ trunk/mono/mono/mini/ChangeLog 2006-10-30 22:38:23 UTC (rev 67154)
@@ -1,3 +1,7 @@
+2006-10-30 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
+
2006-10-23 Zoltan Varga <[EMAIL PROTECTED]>
* aot-compiler.c (emit_method_info): Add a case missed earlier.
Modified: trunk/mono/mono/mini/tramp-x86.c
===================================================================
--- trunk/mono/mono/mini/tramp-x86.c 2006-10-30 22:10:52 UTC (rev 67153)
+++ trunk/mono/mono/mini/tramp-x86.c 2006-10-30 22:38:23 UTC (rev 67154)
@@ -187,6 +187,7 @@
for (i = -16; i < 0; ++i)
printf ("%d ", code [i]);
printf ("\n");
+ disp = reg = 0;
g_assert_not_reached ();
}
Modified: trunk/mono/mono/utils/ChangeLog
===================================================================
--- trunk/mono/mono/utils/ChangeLog 2006-10-30 22:10:52 UTC (rev 67153)
+++ trunk/mono/mono/utils/ChangeLog 2006-10-30 22:38:23 UTC (rev 67154)
@@ -1,3 +1,8 @@
+2006-10-18 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * mono-ehash.c (mono_g_hash_table_destroy): Use mg_free, not
+ g_free.
+
2006-10-17 Miguel de Icaza <[EMAIL PROTECTED]>
* mono-ehash.c: Use the new eglib hash implementation; Currently
Modified: trunk/mono/mono/utils/mono-ehash.c
===================================================================
--- trunk/mono/mono/utils/mono-ehash.c 2006-10-30 22:10:52 UTC (rev 67153)
+++ trunk/mono/mono/utils/mono-ehash.c 2006-10-30 22:38:23 UTC (rev 67154)
@@ -338,9 +338,43 @@
mg_free (s);
}
}
- g_free (hash->table);
+ mg_free (hash->table);
+ mg_free (hash);
+}
+
+void
+mono_g_hash_table_insert_replace (MonoGHashTable *hash, gpointer key, gpointer
value, gboolean replace)
+{
+ guint hashcode;
+ Slot *s;
+ GEqualFunc equal;
- g_free (hash);
+ g_return_if_fail (hash != NULL);
+
+ equal = hash->key_equal_func;
+ if (hash->in_use >= hash->threshold)
+ rehash (hash);
+
+ hashcode = ((*hash->hash_func) (key)) % hash->table_size;
+ for (s = hash->table [hashcode]; s != NULL; s = s->next){
+ if ((*equal) (s->key, key)){
+ if (replace){
+ if (hash->key_destroy_func != NULL)
+ (*hash->key_destroy_func)(s->key);
+ s->key = key;
+ }
+ if (hash->value_destroy_func != NULL)
+ (*hash->value_destroy_func) (s->value);
+ s->value = value;
+ return;
+ }
+ }
+ s = mg_new (Slot, 1);
+ s->key = key;
+ s->value = value;
+ s->next = hash->table [hashcode];
+ hash->table [hashcode] = s;
+ hash->in_use++;
}
void
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches