From 45e6abde1dd67e9a6cc788640764161b0cf85252 Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Wed, 8 Feb 2023 23:06:49 +0100 Subject: GDExtension: array_set_typed() accepts enum instead of uint32_t --- core/extension/gdextension_interface.cpp | 4 ++-- core/extension/gdextension_interface.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/extension/gdextension_interface.cpp b/core/extension/gdextension_interface.cpp index 8f606f7948..2bedb623e4 100644 --- a/core/extension/gdextension_interface.cpp +++ b/core/extension/gdextension_interface.cpp @@ -871,11 +871,11 @@ void gdextension_array_ref(GDExtensionTypePtr p_self, GDExtensionConstTypePtr p_ self->_ref(*from); } -void gdextension_array_set_typed(GDExtensionTypePtr p_self, uint32_t p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script) { +void gdextension_array_set_typed(GDExtensionTypePtr p_self, GDExtensionVariantType p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script) { Array *self = reinterpret_cast(p_self); const StringName *class_name = reinterpret_cast(p_class_name); const Variant *script = reinterpret_cast(p_script); - self->set_typed(p_type, *class_name, *script); + self->set_typed((uint32_t)p_type, *class_name, *script); } /* Dictionary functions */ diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index 3865b152bd..f323b2aa53 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -554,7 +554,7 @@ typedef struct { GDExtensionVariantPtr (*array_operator_index)(GDExtensionTypePtr p_self, GDExtensionInt p_index); // p_self should be an Array ptr GDExtensionVariantPtr (*array_operator_index_const)(GDExtensionConstTypePtr p_self, GDExtensionInt p_index); // p_self should be an Array ptr void (*array_ref)(GDExtensionTypePtr p_self, GDExtensionConstTypePtr p_from); // p_self should be an Array ptr - void (*array_set_typed)(GDExtensionTypePtr p_self, uint32_t p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script); // p_self should be an Array ptr + void (*array_set_typed)(GDExtensionTypePtr p_self, GDExtensionVariantType p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script); // p_self should be an Array ptr /* Dictionary functions */ -- cgit v1.2.3