summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-16 19:19:50 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-16 19:29:11 +0200
commitdcac88095b3a67e75204f6b245d62d481ce2d906 (patch)
tree77c4ec4cbede304afffe0f7a86f8e9886e8b900d /py/mpconfig.h
parentc8742a06ca84528a45a2f5bad7d169694757f096 (diff)
downloadmicropython-dcac88095b3a67e75204f6b245d62d481ce2d906.tar.gz
micropython-dcac88095b3a67e75204f6b245d62d481ce2d906.zip
Add empty "micropython" module to allow more seamless CPython portability.
Implicit "micropython" module contains (at least) codegeneration decorators. Make it explicit, so an app could have "import micropython". On MicroPython, that will be no-op. On CPython, that will give a chance to have a module with placeholder decorators.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 5d8c57692e..505b1b2d18 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -85,6 +85,14 @@ typedef long long mp_longint_impl_t;
#define MICROPY_ENABLE_SLICE (1)
#endif
+// Enable features which improve CPython compatibility
+// but may lead to more code size/memory usage.
+// TODO: Originally intended as generic category to not
+// add bunch of once-off options. May need refactoring later
+#ifndef MICROPY_CPYTHON_COMPAT
+#define MICROPY_CPYTHON_COMPAT (1)
+#endif
+
/*****************************************************************************/
/* Miscellaneous settings */