aboutsummaryrefslogtreecommitdiff
path: root/modules/gdnative/include/gdnative_api_struct.h
diff options
context:
space:
mode:
authorHein-Pieter van Braam2017-09-18 20:02:47 +0200
committerHein-Pieter van Braam2017-09-19 18:55:31 +0200
commit833c3917b247baa46f5a5f6ad6ce478cffc1911d (patch)
tree0f25e4584f1da4b0534c55c9b6f88e0358d8dd98 /modules/gdnative/include/gdnative_api_struct.h
parent85641c545bedbdb703ad923306786afe5c312110 (diff)
downloadgodot-833c3917b247baa46f5a5f6ad6ce478cffc1911d.tar.gz
godot-833c3917b247baa46f5a5f6ad6ce478cffc1911d.tar.zst
godot-833c3917b247baa46f5a5f6ad6ce478cffc1911d.zip
Allow booleanization of all types
We now allow booleanization of all types. This means that empty versions of all types now evaluate to false. So a Vector2(0,0), Dictionary(), etc. This allows you to write GDScript like: if not Dictionary(): print("Empty dict") Booleanization can now also no longer fail. There is no more valid flag, this changes Variant and GDNative API.
Diffstat (limited to 'modules/gdnative/include/gdnative_api_struct.h')
-rw-r--r--modules/gdnative/include/gdnative_api_struct.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdnative/include/gdnative_api_struct.h b/modules/gdnative/include/gdnative_api_struct.h
index cfebeb08c..c345e2722 100644
--- a/modules/gdnative/include/gdnative_api_struct.h
+++ b/modules/gdnative/include/gdnative_api_struct.h
@@ -534,7 +534,7 @@ extern "C" {
GDAPI_FUNC(godot_variant_operator_equal, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
GDAPI_FUNC(godot_variant_operator_less, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
GDAPI_FUNC(godot_variant_hash_compare, godot_bool, const godot_variant *p_self, const godot_variant *p_other) \
- GDAPI_FUNC(godot_variant_booleanize, godot_bool, const godot_variant *p_self, godot_bool *r_valid) \
+ GDAPI_FUNC(godot_variant_booleanize, godot_bool, const godot_variant *p_self) \
GDAPI_FUNC_VOID(godot_variant_destroy, godot_variant *p_self) \
GDAPI_FUNC_VOID(godot_string_new, godot_string *r_dest) \
GDAPI_FUNC_VOID(godot_string_new_copy, godot_string *r_dest, const godot_string *p_src) \