diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-06 22:38:13 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-06 22:38:13 +0200 |
commit | 0b4ae20156c1597671a748192ed8c032ed1d053e (patch) | |
tree | ebb6b242506eb6697e34962cce83e49f3ad96ec9 /core/extension/gdextension_interface.h | |
parent | c9dc1eb1d59bf67bb123ed1ac5f9e0cfb93e275b (diff) | |
parent | 9853a691447cd4e279f48820067174d3833b0065 (diff) | |
download | redot-engine-0b4ae20156c1597671a748192ed8c032ed1d053e.tar.gz |
Merge pull request #78656 from Repiteo/typed-dictionary
Implement typed dictionaries
Diffstat (limited to 'core/extension/gdextension_interface.h')
-rw-r--r-- | core/extension/gdextension_interface.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index 9057e04bf3..d3132baf1b 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -2372,6 +2372,22 @@ typedef GDExtensionVariantPtr (*GDExtensionInterfaceDictionaryOperatorIndex)(GDE */ typedef GDExtensionVariantPtr (*GDExtensionInterfaceDictionaryOperatorIndexConst)(GDExtensionConstTypePtr p_self, GDExtensionConstVariantPtr p_key); +/** + * @name dictionary_set_typed + * @since 4.4 + * + * Makes a Dictionary into a typed Dictionary. + * + * @param p_self A pointer to the Dictionary. + * @param p_key_type The type of Variant the Dictionary key will store. + * @param p_key_class_name A pointer to a StringName with the name of the object (if p_key_type is GDEXTENSION_VARIANT_TYPE_OBJECT). + * @param p_key_script A pointer to a Script object (if p_key_type is GDEXTENSION_VARIANT_TYPE_OBJECT and the base class is extended by a script). + * @param p_value_type The type of Variant the Dictionary value will store. + * @param p_value_class_name A pointer to a StringName with the name of the object (if p_value_type is GDEXTENSION_VARIANT_TYPE_OBJECT). + * @param p_value_script A pointer to a Script object (if p_value_type is GDEXTENSION_VARIANT_TYPE_OBJECT and the base class is extended by a script). + */ +typedef void (*GDExtensionInterfaceDictionarySetTyped)(GDExtensionTypePtr p_self, GDExtensionVariantType p_key_type, GDExtensionConstStringNamePtr p_key_class_name, GDExtensionConstVariantPtr p_key_script, GDExtensionVariantType p_value_type, GDExtensionConstStringNamePtr p_value_class_name, GDExtensionConstVariantPtr p_value_script); + /* INTERFACE: Object */ /** |