summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-10 14:07:24 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-10 14:07:24 +0000
commitddd1e188011a021537c87c75f0a9e1818e335d5d (patch)
tree167b683dbc0bf9b3467592d8b83f506c44b9848c /py/mpconfig.h
parent7bfe4b21b943d73d277441374d8688df91d6e037 (diff)
py: Add config option MICROPY_COMP_MODULE_CONST for module consts.
Compiler optimises lookup of module.CONST when enabled (an existing feature). Disabled by default; enabled for unix, windows, stmhal. Costs about 100 bytes ROM on stmhal.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index bf1a8bda5..dcc116daf 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -152,6 +152,11 @@
/*****************************************************************************/
/* Compiler configuration */
+// Whether to enable lookup of constants in modules; eg module.CONST
+#ifndef MICROPY_COMP_MODULE_CONST
+#define MICROPY_COMP_MODULE_CONST (0)
+#endif
+
// Whether to enable constant optimisation; id = const(value)
#ifndef MICROPY_COMP_CONST
#define MICROPY_COMP_CONST (1)