summaryrefslogtreecommitdiff
path: root/core/variant/variant.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant/variant.h')
-rw-r--r--core/variant/variant.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/variant/variant.h b/core/variant/variant.h
index 373fe32921..780f9b4e70 100644
--- a/core/variant/variant.h
+++ b/core/variant/variant.h
@@ -118,6 +118,11 @@ public:
VARIANT_MAX
};
+ enum {
+ // Maximum recursion depth allowed when serializing variants.
+ MAX_RECURSION_DEPTH = 1024,
+ };
+
private:
friend struct _VariantCall;
friend class VariantInternal;
@@ -253,7 +258,7 @@ private:
true, //PACKED_COLOR_ARRAY,
};
- if (unlikely(needs_deinit[type])) { //make it fast for types that dont need deinit
+ if (unlikely(needs_deinit[type])) { // Make it fast for types that don't need deinit.
_clear_internal();
}
type = NIL;
@@ -502,7 +507,7 @@ public:
static uint32_t get_builtin_method_hash(Variant::Type p_type, const StringName &p_method);
void call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error);
- Variant call(const StringName &p_method, const Variant &p_arg1 = Variant(), const Variant &p_arg2 = Variant(), const Variant &p_arg3 = Variant(), const Variant &p_arg4 = Variant(), const Variant &p_arg5 = Variant());
+ Variant call(const StringName &p_method, const Variant &p_arg1 = Variant(), const Variant &p_arg2 = Variant(), const Variant &p_arg3 = Variant(), const Variant &p_arg4 = Variant(), const Variant &p_arg5 = Variant(), const Variant &p_arg6 = Variant(), const Variant &p_arg7 = Variant(), const Variant &p_arg8 = Variant());
static void call_static(Variant::Type p_type, const StringName &p_method, const Variant **p_args, int p_argcount, Variant &r_ret, Callable::CallError &r_error);