Author: raja
Date: 2007-10-04 08:34:33 -0400 (Thu, 04 Oct 2007)
New Revision: 86872
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/class.c
Log:
Fix #328812
* class.c (mono_image_init_name_cache): Don't return nested
'protected internal' classes.
(mono_class_from_name_case): Likewise.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2007-10-04 12:34:01 UTC (rev 86871)
+++ trunk/mono/mono/metadata/ChangeLog 2007-10-04 12:34:33 UTC (rev 86872)
@@ -1,3 +1,10 @@
+2007-10-04 Raja R Harinath <[EMAIL PROTECTED]>
+
+ Fix #328812
+ * class.c (mono_image_init_name_cache): Don't return nested
+ 'protected internal' classes.
+ (mono_class_from_name_case): Likewise.
+
2007-10-04 Atsushi Enomoto <[EMAIL PROTECTED]>
* icall-def.h, icall.c : get_bundled_machine_config() is now the
Modified: trunk/mono/mono/metadata/class.c
===================================================================
--- trunk/mono/mono/metadata/class.c 2007-10-04 12:34:01 UTC (rev 86871)
+++ trunk/mono/mono/metadata/class.c 2007-10-04 12:34:33 UTC (rev 86872)
@@ -4492,9 +4492,12 @@
for (i = 1; i <= t->rows; ++i) {
mono_metadata_decode_row (t, i - 1, cols, MONO_TYPEDEF_SIZE);
- /* nested types are accessed from the nesting name */
visib = cols [MONO_TYPEDEF_FLAGS] &
TYPE_ATTRIBUTE_VISIBILITY_MASK;
- if (visib > TYPE_ATTRIBUTE_PUBLIC && visib <=
TYPE_ATTRIBUTE_NESTED_ASSEMBLY)
+ /*
+ * Nested types are accessed from the nesting name. We use the
fact that nested types use different visibility flags
+ * than toplevel types, thus avoiding the need to grovel
through the NESTED_TYPE table
+ */
+ if (visib >= TYPE_ATTRIBUTE_NESTED_PUBLIC && visib <=
TYPE_ATTRIBUTE_NESTED_FAM_OR_ASSEM)
continue;
name = mono_metadata_string_heap (image, cols
[MONO_TYPEDEF_NAME]);
nspace = mono_metadata_string_heap (image, cols
[MONO_TYPEDEF_NAMESPACE]);
@@ -4631,9 +4634,12 @@
/* add a cache if needed */
for (i = 1; i <= t->rows; ++i) {
mono_metadata_decode_row (t, i - 1, cols, MONO_TYPEDEF_SIZE);
- /* nested types are accessed from the nesting name */
visib = cols [MONO_TYPEDEF_FLAGS] &
TYPE_ATTRIBUTE_VISIBILITY_MASK;
- if (visib > TYPE_ATTRIBUTE_PUBLIC && visib <=
TYPE_ATTRIBUTE_NESTED_ASSEMBLY)
+ /*
+ * Nested types are accessed from the nesting name. We use the
fact that nested types use different visibility flags
+ * than toplevel types, thus avoiding the need to grovel
through the NESTED_TYPE table
+ */
+ if (visib >= TYPE_ATTRIBUTE_NESTED_PUBLIC && visib <=
TYPE_ATTRIBUTE_NESTED_FAM_OR_ASSEM)
continue;
n = mono_metadata_string_heap (image, cols [MONO_TYPEDEF_NAME]);
nspace = mono_metadata_string_heap (image, cols
[MONO_TYPEDEF_NAMESPACE]);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches