From bdcb1ff22824ab3d77750fd68e00e8d4be52469c Mon Sep 17 00:00:00 2001 From: dzil123 <5725958+dzil123@users.noreply.github.com> Date: Wed, 2 Nov 2022 03:20:26 -0700 Subject: [PATCH] [3.x] Fix c# Array.Shuffle incorrect mono bindings --- modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs | 2 +- modules/mono/glue/collections_glue.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs index a4120471967..3e15a190397 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs @@ -326,7 +326,7 @@ namespace Godot.Collections internal static extern Error godot_icall_Array_Resize(IntPtr ptr, int newSize); [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern Error godot_icall_Array_Shuffle(IntPtr ptr); + internal static extern void godot_icall_Array_Shuffle(IntPtr ptr); [MethodImpl(MethodImplOptions.InternalCall)] internal static extern void godot_icall_Array_Generic_GetElementTypeInfo(Type elemType, out int elemTypeEncoding, out IntPtr elemTypeClass); diff --git a/modules/mono/glue/collections_glue.h b/modules/mono/glue/collections_glue.h index 315d4b100ce..23bec8606ad 100644 --- a/modules/mono/glue/collections_glue.h +++ b/modules/mono/glue/collections_glue.h @@ -71,6 +71,8 @@ void godot_icall_Array_RemoveAt(Array *ptr, int index); int32_t godot_icall_Array_Resize(Array *ptr, int new_size); +void godot_icall_Array_Shuffle(Array *ptr); + void godot_icall_Array_Generic_GetElementTypeInfo(MonoReflectionType *refltype, uint32_t *type_encoding, GDMonoClass **type_class); MonoString *godot_icall_Array_ToString(Array *ptr);