diff --git a/modules/gdnative/gdnative/dictionary.cpp b/modules/gdnative/gdnative/dictionary.cpp index c3d428d69b8..08fbb28687c 100644 --- a/modules/gdnative/gdnative/dictionary.cpp +++ b/modules/gdnative/gdnative/dictionary.cpp @@ -186,6 +186,14 @@ godot_variant GDAPI godot_dictionary_get_with_default(const godot_dictionary *p_ return raw_dest; } +// GDNative core 1.3 + +void GDAPI godot_dictionary_merge(godot_dictionary *p_self, const godot_dictionary *p_dictionary, const godot_bool p_overwrite) { + Dictionary *self = (Dictionary *)p_self; + const Dictionary *dictionary = (const Dictionary *)p_dictionary; + self->merge(*dictionary, p_overwrite); +} + #ifdef __cplusplus } #endif diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json index f94c6514709..8aff0c48a55 100644 --- a/modules/gdnative/gdnative_api.json +++ b/modules/gdnative/gdnative_api.json @@ -25,6 +25,15 @@ }, "next": null, "api": [ + { + "name": "godot_dictionary_merge", + "return_type": "void", + "arguments": [ + ["godot_dictionary *", "p_self"], + ["const godot_dictionary *", "p_dictionary"], + ["const godot_bool", "p_overwrite"] + ] + }, { "name": "godot_pool_byte_array_has", "return_type": "godot_bool", diff --git a/modules/gdnative/include/gdnative/dictionary.h b/modules/gdnative/include/gdnative/dictionary.h index 6e8d5116884..1a7411ec140 100644 --- a/modules/gdnative/include/gdnative/dictionary.h +++ b/modules/gdnative/include/gdnative/dictionary.h @@ -102,6 +102,10 @@ godot_bool GDAPI godot_dictionary_erase_with_return(godot_dictionary *p_self, co godot_variant GDAPI godot_dictionary_get_with_default(const godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_default); +// GDNative core 1.3 + +void GDAPI godot_dictionary_merge(godot_dictionary *p_self, const godot_dictionary *p_dictionary, const godot_bool p_overwrite); + #ifdef __cplusplus } #endif