Skip to content

Commit bc04dc2

Browse files
committed
py/gc: Make (byte)array type dumping conditional on these types being enabled.
1 parent 3d7f3f0 commit bc04dc2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

py/gc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,12 @@ void gc_dump_alloc_table(void) {
735735
else if (*ptr == &mp_type_list) { c = 'L'; }
736736
else if (*ptr == &mp_type_dict) { c = 'D'; }
737737
else if (*ptr == &mp_type_str || *ptr == &mp_type_bytes) { c = 'S'; }
738-
else if (*ptr == &mp_type_bytearray || *ptr == &mp_type_array) { c = 'A'; }
738+
#if MICROPY_PY_BUILTINS_BYTEARRAY
739+
else if (*ptr == &mp_type_bytearray) { c = 'A'; }
740+
#endif
741+
#if MICROPY_PY_ARRAY
742+
else if (*ptr == &mp_type_array) { c = 'A'; }
743+
#endif
739744
#if MICROPY_PY_BUILTINS_FLOAT
740745
else if (*ptr == &mp_type_float) { c = 'F'; }
741746
#endif

0 commit comments

Comments
 (0)