+Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
+
+ * reflection.c: sort the constant table (bug #70693).
+
Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
* object-internals.h, threads.c, domain.c: add accessors for
static int
compare_semantics (const void *a, const void *b)
+{
+ const guint32 *a_values = a;
+ const guint32 *b_values = b;
+ return a_values [MONO_CONSTANT_PARENT] - b_values [MONO_CONSTANT_PARENT];
+}
+
+static int
+compare_constants (const void *a, const void *b)
{
const guint32 *a_values = a;
const guint32 *b_values = b;
p = (unsigned char*)int32val;
/* sort the tables that still need sorting */
+ table = &assembly->tables [MONO_TABLE_CONSTANT];
+ if (table->rows)
+ qsort (table->values + MONO_CONSTANT_SIZE, table->rows, sizeof (guint32) * MONO_CONSTANT_SIZE, compare_constants);
table = &assembly->tables [MONO_TABLE_METHODSEMANTICS];
if (table->rows)
qsort (table->values + MONO_METHOD_SEMA_SIZE, table->rows, sizeof (guint32) * MONO_METHOD_SEMA_SIZE, compare_semantics);