summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
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/mpconfig.h
parent0a1ea402739f400bb477e00dbc21c97feaec4fea (diff)
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/mpconfig.h')
-rw-r--r--py/mpconfig.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index d7504c140..5b27b910e 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -249,6 +249,11 @@ typedef double mp_float_t;
/*****************************************************************************/
/* Fine control over Python builtins, classes, modules, etc */
+// Whether to support bytearray object
+#ifndef MICROPY_PY_BUILTINS_BYTEARRAY
+#define MICROPY_PY_BUILTINS_BYTEARRAY (1)
+#endif
+
// Whether to support set object
#ifndef MICROPY_PY_BUILTINS_SET
#define MICROPY_PY_BUILTINS_SET (1)
@@ -269,6 +274,13 @@ typedef double mp_float_t;
#define MICROPY_PY_BUILTINS_PROPERTY (1)
#endif
+// Whether to provide "array" module. Note that large chunk of the
+// underlying code is shared with "bytearray" builtin type, so to
+// get real savings, it should be disabled too.
+#ifndef MICROPY_PY_ARRAY
+#define MICROPY_PY_ARRAY (1)
+#endif
+
// Whether to provide "collections" module
#ifndef MICROPY_PY_COLLECTIONS
#define MICROPY_PY_COLLECTIONS (1)