summaryrefslogtreecommitdiff
path: root/modules/gdnative/include
diff options
context:
space:
mode:
authorkarroffel <therzog@mail.de>2019-02-21 20:12:57 +0100
committerkarroffel <therzog@mail.de>2019-02-21 20:12:57 +0100
commit56bb22c988ce84995a674e3b5f58cc22dfc41a8b (patch)
tree80683518d1a033541d676a34c08dfef5baf4e364 /modules/gdnative/include
parenta01dca79e2f7b7cb221a4c416cade4fad2941446 (diff)
added godot_dictionary_get_with_default to GDNative
Recently, Dictionary::get() was introduced, which acts like a index operator but allows the caller to specify a default value to return instead of issuing an error. This commit adds a new GDNative function that includes the default value.
Diffstat (limited to 'modules/gdnative/include')
-rw-r--r--modules/gdnative/include/gdnative/dictionary.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdnative/include/gdnative/dictionary.h b/modules/gdnative/include/gdnative/dictionary.h
index 7703742899..14e35b4692 100644
--- a/modules/gdnative/include/gdnative/dictionary.h
+++ b/modules/gdnative/include/gdnative/dictionary.h
@@ -94,8 +94,12 @@ godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self,
godot_string GDAPI godot_dictionary_to_json(const godot_dictionary *p_self);
+// GDNative core 1.1
+
godot_bool GDAPI godot_dictionary_erase_with_return(godot_dictionary *p_self, const godot_variant *p_key);
+godot_variant GDAPI godot_dictionary_get_with_default(const godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_default);
+
#ifdef __cplusplus
}
#endif