diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-01-24 19:54:20 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-01-30 14:23:31 +0200 |
commit | 5aa87ccc0353939b8bb471aac17875cf0f586ff8 (patch) | |
tree | 983f015530ddd882e2fc6e03da0b3394aa45fe8e /core/extension | |
parent | 833c0d24dbf3c442857fd9d7b1fd17918fadddc9 (diff) |
Move Array:set_typed to internal GDExtension structure and unexposed it.
Diffstat (limited to 'core/extension')
-rw-r--r-- | core/extension/gdextension_interface.cpp | 8 | ||||
-rw-r--r-- | core/extension/gdextension_interface.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/core/extension/gdextension_interface.cpp b/core/extension/gdextension_interface.cpp index a9063c8b27..63ed60a710 100644 --- a/core/extension/gdextension_interface.cpp +++ b/core/extension/gdextension_interface.cpp @@ -856,6 +856,13 @@ static GDExtensionVariantPtr gdextension_array_operator_index_const(GDExtensionC return (GDExtensionVariantPtr)&self->operator[](p_index); } +void gdextension_array_set_typed(GDExtensionTypePtr p_self, uint32_t p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script) { + Array *self = reinterpret_cast<Array *>(p_self); + const StringName *class_name = reinterpret_cast<const StringName *>(p_class_name); + const Variant *script = reinterpret_cast<const Variant *>(p_script); + self->set_typed(p_type, *class_name, *script); +} + /* Dictionary functions */ static GDExtensionVariantPtr gdextension_dictionary_operator_index(GDExtensionTypePtr p_self, GDExtensionConstVariantPtr p_key) { @@ -1129,6 +1136,7 @@ void gdextension_setup_interface(GDExtensionInterface *p_interface) { gde_interface.array_operator_index = gdextension_array_operator_index; gde_interface.array_operator_index_const = gdextension_array_operator_index_const; + gde_interface.array_set_typed = gdextension_array_set_typed; /* Dictionary functions */ diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index 6e5dee8265..7f8f7374e9 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -551,6 +551,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_set_typed)(GDExtensionTypePtr p_self, uint32_t p_type, GDExtensionConstStringNamePtr p_class_name, GDExtensionConstVariantPtr p_script); // p_self should be an Array ptr /* Dictionary functions */ |