summaryrefslogtreecommitdiffstatshomepage
path: root/py/modarray.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-27 20:39:09 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-27 21:02:04 +0300
commitcb78f862cb595bf1e4f164869fe44a4ee7755a55 (patch)
tree3b73f937959315b5aab4c5eebe9f5c27c4a24b66 /py/modarray.c
parent0a1ea402739f400bb477e00dbc21c97feaec4fea (diff)
downloadmicropython-cb78f862cb595bf1e4f164869fe44a4ee7755a55.tar.gz
micropython-cb78f862cb595bf1e4f164869fe44a4ee7755a55.zip
py: Allow to disable array module and bytearray type.
array.array and bytearray share big deal of code, so to get real savings, both need to be disabled.
Diffstat (limited to 'py/modarray.c')
-rw-r--r--py/modarray.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/modarray.c b/py/modarray.c
index 3ff567f1d9..c0fe331643 100644
--- a/py/modarray.c
+++ b/py/modarray.c
@@ -30,6 +30,8 @@
#include "obj.h"
#include "builtin.h"
+#if MICROPY_PY_ARRAY
+
STATIC const mp_map_elem_t mp_module_array_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_array) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_array), (mp_obj_t)&mp_type_array },
@@ -51,3 +53,5 @@ const mp_obj_module_t mp_module_array = {
.name = MP_QSTR_array,
.globals = (mp_obj_dict_t*)&mp_module_array_globals,
};
+
+#endif