summaryrefslogtreecommitdiff
path: root/py/obj.h
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-07-19 15:19:21 -0400
committerDan Halbert <halbert@halwitz.org>2018-07-19 15:19:21 -0400
commitbe1d882a8b5d2878c9b4402ae641abf9a88cd682 (patch)
treef40d5269a71138367f49f70fcdf39adeccb204a9 /py/obj.h
parent85a5276f36fb8b1be981d3155e4f0ef0c4cf72df (diff)
Prevent repetitive recursive scanning of dicts when making them long-lived
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h4
1 files changed, 3 insertions, 1 deletions
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;