Author: zoltan
Date: 2005-12-13 09:09:58 -0500 (Tue, 13 Dec 2005)
New Revision: 54280

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/reflection.c
Log:
2005-12-13  Zoltan Varga  <[EMAIL PROTECTED]>

        * reflection.c (custom_attr_visible): Really fix this.


Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2005-12-13 13:57:51 UTC (rev 54279)
+++ trunk/mono/mono/metadata/ChangeLog  2005-12-13 14:09:58 UTC (rev 54280)
@@ -1,3 +1,7 @@
+2005-12-13  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * reflection.c (custom_attr_visible): Really fix this.
+
 2005-12-12  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * reflection.c (custom_attr_visible): Allow nested public attributes

Modified: trunk/mono/mono/metadata/reflection.c
===================================================================
--- trunk/mono/mono/metadata/reflection.c       2005-12-13 13:57:51 UTC (rev 
54279)
+++ trunk/mono/mono/metadata/reflection.c       2005-12-13 14:09:58 UTC (rev 
54280)
@@ -1048,10 +1048,14 @@
 custom_attr_visible (MonoImage *image, MonoReflectionCustomAttr *cattr)
 {
        /* FIXME: Need to do more checks */
-       if (cattr->ctor->method && (cattr->ctor->method->klass->image != image) 
&& !((cattr->ctor->method->klass->flags & TYPE_ATTRIBUTE_VISIBILITY_MASK) & 
(TYPE_ATTRIBUTE_PUBLIC|TYPE_ATTRIBUTE_NESTED_PUBLIC)))
-               return FALSE;
-       else
-               return TRUE;
+       if (cattr->ctor->method && (cattr->ctor->method->klass->image != 
image)) {
+               int visibility = cattr->ctor->method->klass->flags & 
TYPE_ATTRIBUTE_VISIBILITY_MASK;
+
+               if ((visibility != TYPE_ATTRIBUTE_PUBLIC) && (visibility != 
TYPE_ATTRIBUTE_NESTED_PUBLIC))
+                       return FALSE;
+       }
+
+       return TRUE;
 }
 
 static MonoCustomAttrInfo*

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to