summaryrefslogtreecommitdiffstats
path: root/modules/mono/mono_gd/gd_mono_cache.cpp
diff options
context:
space:
mode:
authorIgnacio Roldán Etcheverry <neikeq@users.noreply.github.com>2021-12-04 12:38:09 +0100
committerGitHub <noreply@github.com>2021-12-04 12:38:09 +0100
commit2a9dd654bc0197dd864df61b5b37e302022c2871 (patch)
treece700ebd9d9b0b5eff5d4202ead4dae9e50bad18 /modules/mono/mono_gd/gd_mono_cache.cpp
parentd394cbce994d41155f6a33b795c8f6c7af640c56 (diff)
parentd28be4d5808947606b8189ae1b2900b8fd2925cf (diff)
downloadredot-engine-2a9dd654bc0197dd864df61b5b37e302022c2871.tar.gz
Merge pull request #55563 from raulsntos/csharp-delegates-for-generic-class
Fix C# `get_all_delegates` method for generic classes
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_cache.cpp')
-rw-r--r--modules/mono/mono_gd/gd_mono_cache.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/mono/mono_gd/gd_mono_cache.cpp b/modules/mono/mono_gd/gd_mono_cache.cpp
index 2bf55493e0..60277e0652 100644
--- a/modules/mono/mono_gd/gd_mono_cache.cpp
+++ b/modules/mono/mono_gd/gd_mono_cache.cpp
@@ -177,6 +177,8 @@ void CachedData::clear_godot_api_cache() {
methodthunk_MarshalUtils_TypeIsGenericICollection.nullify();
methodthunk_MarshalUtils_TypeIsGenericIDictionary.nullify();
+ methodthunk_MarshalUtils_GetGenericTypeDefinition.nullify();
+
methodthunk_MarshalUtils_ArrayGetElementType.nullify();
methodthunk_MarshalUtils_DictionaryGetKeyValueTypes.nullify();
@@ -299,6 +301,8 @@ void update_godot_api_cache() {
CACHE_METHOD_THUNK_AND_CHECK(MarshalUtils, TypeIsGenericICollection, GODOT_API_CLASS(MarshalUtils)->get_method("TypeIsGenericICollection", 1));
CACHE_METHOD_THUNK_AND_CHECK(MarshalUtils, TypeIsGenericIDictionary, GODOT_API_CLASS(MarshalUtils)->get_method("TypeIsGenericIDictionary", 1));
+ CACHE_METHOD_THUNK_AND_CHECK(MarshalUtils, GetGenericTypeDefinition, GODOT_API_CLASS(MarshalUtils)->get_method("GetGenericTypeDefinition", 2));
+
CACHE_METHOD_THUNK_AND_CHECK(MarshalUtils, ArrayGetElementType, GODOT_API_CLASS(MarshalUtils)->get_method("ArrayGetElementType", 2));
CACHE_METHOD_THUNK_AND_CHECK(MarshalUtils, DictionaryGetKeyValueTypes, GODOT_API_CLASS(MarshalUtils)->get_method("DictionaryGetKeyValueTypes", 3));