2003-01-10 Dietmar Maurer <dietmar@ximian.com>
authorDietmar Maurer <dietmar@mono-cvs.ximian.com>
Fri, 10 Jan 2003 16:31:27 +0000 (16:31 -0000)
committerDietmar Maurer <dietmar@mono-cvs.ximian.com>
Fri, 10 Jan 2003 16:31:27 +0000 (16:31 -0000)
* marshal.c (emit_struct_conv): added an assertion for EXPLICIT_LAYOUT

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

mono/metadata/ChangeLog
mono/metadata/marshal.c

index 50df76d9ee90085b83e45b9206750a49bd51b0ac..f7ba56c55b7c4d7eede05f9c0e4f3cbfd32b880b 100644 (file)
@@ -1,5 +1,7 @@
 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
 
+       * marshal.c (emit_struct_conv): added an assertion for EXPLICIT_LAYOUT
+
        * loader.c (mono_method_get_marshal_info): bug fix
 
        * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
index f72f9b158bc60d5670a5d48d28519c6452c71471..7b876671d418cc8e62c032b873a139f9507f928b 100644 (file)
@@ -780,6 +780,11 @@ emit_struct_conv (MonoMethodBuilder *mb, MonoClass *klass, gboolean to_object)
 
        info = mono_marshal_load_type_info (klass);
 
+       if ((klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) == TYPE_ATTRIBUTE_EXPLICIT_LAYOUT) {
+               /* we should simply emit a BLKCOPY in this case */
+               g_assert_not_reached ();
+       }
+
        for (i = 0; i < info->num_fields; i++) {
                MonoMarshalNative ntype;
                MonoMarshalConv conv;