324636473a
Variants like dictionaries and arrays can have cyclic references, which caused `encode_variant` to run an infinite recursion. Instead of keeping a stack and looking for cyclic references which would make serialization slower, this commit adds a `MAX_RECURSION_DEPTH` constant to Variant, and have `encode_variant` keep track of the current recursion depth, bailing when it's too high since this likely means a cyclic reference has been encountered. |
||
---|---|---|
.. | ||
array.cpp | ||
array.h | ||
binder_common.h | ||
callable.cpp | ||
callable.h | ||
callable_bind.cpp | ||
callable_bind.h | ||
container_type_validate.h | ||
dictionary.cpp | ||
dictionary.h | ||
method_ptrcall.h | ||
SCsub | ||
type_info.h | ||
typed_array.h | ||
variant.cpp | ||
variant.h | ||
variant_call.cpp | ||
variant_construct.cpp | ||
variant_construct.h | ||
variant_internal.h | ||
variant_op.cpp | ||
variant_op.h | ||
variant_parser.cpp | ||
variant_parser.h | ||
variant_setget.cpp | ||
variant_setget.h | ||
variant_utility.cpp |