[GDNative] Expose Dictionary::merge() over to GDNative CORE API v1.3

This commit is contained in:
Kirill Diduk 2022-07-17 19:12:51 +02:00
parent dc1a3554e0
commit b5483a6aad
3 changed files with 21 additions and 0 deletions

View file

@ -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

View file

@ -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",

View file

@ -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