Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2004-07-24 23:11:46 +0400
committerMartin Baulig <martin@novell.com>2004-07-24 23:11:46 +0400
commit051ff8395237360137b3b64b36d973fea220b041 (patch)
tree04a83ac26073f03528e59d02698cf3dc30da600d
parente2becf58a953d33988fc27185db333cb7117011b (diff)
2004-07-24 Martin Baulig <martin@ximian.com>
* reflection.c (mono_image_get_type_info): Only write a class layout entry if we actually have a size or a packing size. svn path=/trunk/mono/; revision=31434
-rw-r--r--mono/metadata/ChangeLog5
-rw-r--r--mono/metadata/reflection.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog
index b11ad4dfeb1..52c77c12780 100644
--- a/mono/metadata/ChangeLog
+++ b/mono/metadata/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-24 Martin Baulig <martin@ximian.com>
+
+ * reflection.c (mono_image_get_type_info): Only write a class
+ layout entry if we actually have a size or a packing size.
+
2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
* reflection.c (type_get_fully_qualified_name):
diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c
index 2b3571cbfb0..dd59e474914 100644
--- a/mono/metadata/reflection.c
+++ b/mono/metadata/reflection.c
@@ -2716,7 +2716,8 @@ mono_image_get_type_info (MonoDomain *domain, MonoReflectionTypeBuilder *tb, Mon
* if we have explicitlayout or sequentiallayouts, output data in the
* ClassLayout table.
*/
- if (((tb->attrs & TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT) && (tb->class_size != -1)) {
+ if (((tb->attrs & TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT) &&
+ ((tb->class_size > 0) || (tb->packing_size > 0))) {
table = &assembly->tables [MONO_TABLE_CLASSLAYOUT];
table->rows++;
alloc_table (table, table->rows);