aboutsummaryrefslogtreecommitdiff
path: root/py/gc.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-11 19:21:53 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-11 19:21:53 +0300
commitbc04dc277ed5c0dd1cce6e91bb713288ceeb4ff2 (patch)
treee8f3a878dd2daf351fba0f47a1e35c091f3593f8 /py/gc.c
parent3d7f3f00e03ef165aebef68a5f9710631494654b (diff)
py/gc: Make (byte)array type dumping conditional on these types being enabled.
Diffstat (limited to 'py/gc.c')
-rw-r--r--py/gc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/py/gc.c b/py/gc.c
index cb22050d4..0a6b14bfe 100644
--- a/py/gc.c
+++ b/py/gc.c
@@ -735,7 +735,12 @@ void gc_dump_alloc_table(void) {
else if (*ptr == &mp_type_list) { c = 'L'; }
else if (*ptr == &mp_type_dict) { c = 'D'; }
else if (*ptr == &mp_type_str || *ptr == &mp_type_bytes) { c = 'S'; }
- else if (*ptr == &mp_type_bytearray || *ptr == &mp_type_array) { c = 'A'; }
+ #if MICROPY_PY_BUILTINS_BYTEARRAY
+ else if (*ptr == &mp_type_bytearray) { c = 'A'; }
+ #endif
+ #if MICROPY_PY_ARRAY
+ else if (*ptr == &mp_type_array) { c = 'A'; }
+ #endif
#if MICROPY_PY_BUILTINS_FLOAT
else if (*ptr == &mp_type_float) { c = 'F'; }
#endif