diff options
author | Raul Santos <raulsntos@gmail.com> | 2021-12-02 20:05:05 +0100 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2021-12-04 02:54:33 +0100 |
commit | d28be4d5808947606b8189ae1b2900b8fd2925cf (patch) | |
tree | 1878429ad479a4eabad5bfd4b4a0b95a70eaa94a /modules/mono/mono_gd/gd_mono_utils.cpp | |
parent | 892a5a72cd9b25dc660671b9f4244fd842884b9f (diff) |
Fix get_all_delegates method for generic classes
If the class is generic, we must get its generic type definition and use
it to retrieve the delegates.
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_utils.cpp')
-rw-r--r-- | modules/mono/mono_gd/gd_mono_utils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index 09aa9ad948..505c637af9 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -614,6 +614,12 @@ bool type_is_generic_idictionary(MonoReflectionType *p_reftype) { return (bool)res; } +void get_generic_type_definition(MonoReflectionType *p_reftype, MonoReflectionType **r_generic_reftype) { + MonoException *exc = nullptr; + CACHED_METHOD_THUNK(MarshalUtils, GetGenericTypeDefinition).invoke(p_reftype, r_generic_reftype, &exc); + UNHANDLED_EXCEPTION(exc); +} + void array_get_element_type(MonoReflectionType *p_array_reftype, MonoReflectionType **r_elem_reftype) { MonoException *exc = nullptr; CACHED_METHOD_THUNK(MarshalUtils, ArrayGetElementType).invoke(p_array_reftype, r_elem_reftype, &exc); |