From be1d882a8b5d2878c9b4402ae641abf9a88cd682 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 19 Jul 2018 15:19:21 -0400 Subject: Prevent repetitive recursive scanning of dicts when making them long-lived --- py/obj.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'py/obj.h') diff --git a/py/obj.h b/py/obj.h index d086d3c14..8e95983f0 100644 --- a/py/obj.h +++ b/py/obj.h @@ -359,7 +359,9 @@ typedef struct _mp_map_t { size_t all_keys_are_qstrs : 1; size_t is_fixed : 1; // a fixed array that can't be modified; must also be ordered size_t is_ordered : 1; // an ordered array - size_t used : (8 * sizeof(size_t) - 3); + size_t scanning : 1; // true if we're in the middle of scanning linked dictionaries, + // e.g., make_dict_long_lived() + size_t used : (8 * sizeof(size_t) - 4); size_t alloc; mp_map_elem_t *table; } mp_map_t; -- cgit v1.2.3