diff options
author | Raul Santos <raulsntos@gmail.com> | 2022-01-12 23:26:51 +0100 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2022-01-12 23:26:51 +0100 |
commit | e4c40efeab321d84de658b1d1220d07c9eec43c9 (patch) | |
tree | 20cda6960ca13d5a304fef4e66d34c5a6feba636 /modules/mono/glue/GodotSharp | |
parent | eba047eff5101cf6821f419cc3c1013f91f1c2a1 (diff) |
Fix marshaling values of generic Godot Dictionary
Diffstat (limited to 'modules/mono/glue/GodotSharp')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs index 75240b0c09..e80b6af68f 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs @@ -320,6 +320,9 @@ namespace Godot.Collections internal static extern void godot_icall_Dictionary_KeyValuePairAt(IntPtr ptr, int index, out object key, out object value); [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern void godot_icall_Dictionary_KeyValuePairAt_Generic(IntPtr ptr, int index, out object key, out object value, int valueTypeEncoding, IntPtr valueTypeClass); + + [MethodImpl(MethodImplOptions.InternalCall)] internal static extern void godot_icall_Dictionary_Add(IntPtr ptr, object key, object value); [MethodImpl(MethodImplOptions.InternalCall)] @@ -485,7 +488,7 @@ namespace Godot.Collections private KeyValuePair<TKey, TValue> GetKeyValuePair(int index) { - Dictionary.godot_icall_Dictionary_KeyValuePairAt(GetPtr(), index, out object key, out object value); + Dictionary.godot_icall_Dictionary_KeyValuePairAt_Generic(GetPtr(), index, out object key, out object value, valTypeEncoding, valTypeClass); return new KeyValuePair<TKey, TValue>((TKey)key, (TValue)value); } |