Skip to content

Commit 45e6abd

Browse files
committed
GDExtension: array_set_typed() accepts enum instead of uint32_t
1 parent 2572f68 commit 45e6abd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/extension/gdextension_interface.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -871,11 +871,11 @@ void gdextension_array_ref(GDExtensionTypePtr p_self, GDExtensionConstTypePtr p_
871871
self->_ref(*from);
872872
}
873873

874-
void gdextension_array_set_typed(GDExtensionTypePtr p_self, uint32_t p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script) {
874+
void gdextension_array_set_typed(GDExtensionTypePtr p_self, GDExtensionVariantType p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script) {
875875
Array *self = reinterpret_cast<Array *>(p_self);
876876
const StringName *class_name = reinterpret_cast<const StringName *>(p_class_name);
877877
const Variant *script = reinterpret_cast<const Variant *>(p_script);
878-
self->set_typed(p_type, *class_name, *script);
878+
self->set_typed((uint32_t)p_type, *class_name, *script);
879879
}
880880

881881
/* Dictionary functions */

core/extension/gdextension_interface.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ typedef struct {
554554
GDExtensionVariantPtr (*array_operator_index)(GDExtensionTypePtr p_self, GDExtensionInt p_index); // p_self should be an Array ptr
555555
GDExtensionVariantPtr (*array_operator_index_const)(GDExtensionConstTypePtr p_self, GDExtensionInt p_index); // p_self should be an Array ptr
556556
void (*array_ref)(GDExtensionTypePtr p_self, GDExtensionConstTypePtr p_from); // p_self should be an Array ptr
557-
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
557+
void (*array_set_typed)(GDExtensionTypePtr p_self, GDExtensionVariantType p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script); // p_self should be an Array ptr
558558

559559
/* Dictionary functions */
560560

0 commit comments

Comments
 (0)