From 671867e925476bc974a93adc648d6a09b6079632 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 15 Aug 2019 00:55:54 +0300 Subject: [PATCH] [cominterop] Fix copy-paste error in ComVisibleAttribute testing helper. This type was introduced with mono/mono@29a95bafd87830c430432546af4bf7076ba5542f. Commit migrated from https://github.com/mono/mono/commit/5b66d3d5187906d708fd9c22e67e5581f117bb37 --- src/mono/mono/metadata/cominterop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mono/mono/metadata/cominterop.c b/src/mono/mono/metadata/cominterop.c index d88fc9a..3ea0eeb 100644 --- a/src/mono/mono/metadata/cominterop.c +++ b/src/mono/mono/metadata/cominterop.c @@ -148,6 +148,7 @@ GENERATE_GET_CLASS_WITH_CACHE (variant, "System", "Variant") static GENERATE_GET_CLASS_WITH_CACHE (interface_type_attribute, "System.Runtime.InteropServices", "InterfaceTypeAttribute") static GENERATE_GET_CLASS_WITH_CACHE (guid_attribute, "System.Runtime.InteropServices", "GuidAttribute") +static GENERATE_GET_CLASS_WITH_CACHE (com_visible_attribute, "System.Runtime.InteropServices", "ComVisibleAttribute") /* Upon creation of a CCW, only allocate a weak handle and set the * reference count to 0. If the unmanaged client code decides to addref and @@ -512,7 +513,7 @@ cominterop_com_visible (MonoClass* klass) cinfo = mono_custom_attrs_from_class_checked (klass, error); mono_error_assert_ok (error); if (cinfo) { - MonoReflectionComVisibleAttribute *attr = (MonoReflectionComVisibleAttribute*)mono_custom_attrs_get_attr_checked (cinfo, mono_class_get_guid_attribute_class (), error); + MonoReflectionComVisibleAttribute *attr = (MonoReflectionComVisibleAttribute*)mono_custom_attrs_get_attr_checked (cinfo, mono_class_get_com_visible_attribute_class (), error); mono_error_assert_ok (error); /*FIXME proper error handling*/ if (attr) -- 2.7.4