mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge commit godotengine/godot@428a762e98
This commit is contained in:
@@ -1292,11 +1292,13 @@ static GDExtensionVariantPtr gdextension_array_operator_index_const(GDExtensionC
|
||||
return (GDExtensionVariantPtr)&self->operator[](p_index);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
void gdextension_array_ref(GDExtensionTypePtr p_self, GDExtensionConstTypePtr p_from) {
|
||||
Array *self = (Array *)p_self;
|
||||
const Array *from = (const Array *)p_from;
|
||||
self->_ref(*from);
|
||||
self->Array::operator=(*from);
|
||||
}
|
||||
#endif // DISABLE_DEPRECATED
|
||||
|
||||
void gdextension_array_set_typed(GDExtensionTypePtr p_self, GDExtensionVariantType p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script) {
|
||||
Array *self = reinterpret_cast<Array *>(p_self);
|
||||
@@ -1814,7 +1816,9 @@ void gdextension_setup_interface() {
|
||||
REGISTER_INTERFACE_FUNC(packed_vector4_array_operator_index_const);
|
||||
REGISTER_INTERFACE_FUNC(array_operator_index);
|
||||
REGISTER_INTERFACE_FUNC(array_operator_index_const);
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
REGISTER_INTERFACE_FUNC(array_ref);
|
||||
#endif // DISABLE_DEPRECATED
|
||||
REGISTER_INTERFACE_FUNC(array_set_typed);
|
||||
REGISTER_INTERFACE_FUNC(dictionary_operator_index);
|
||||
REGISTER_INTERFACE_FUNC(dictionary_operator_index_const);
|
||||
|
||||
@@ -2411,6 +2411,7 @@ typedef GDExtensionVariantPtr (*GDExtensionInterfaceArrayOperatorIndexConst)(GDE
|
||||
/**
|
||||
* @name array_ref
|
||||
* @since 4.1
|
||||
* @deprecated in Godot 4.5. use `Array::operator=` instead.
|
||||
*
|
||||
* Sets an Array to be a reference to another Array object.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user