summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-07-25 11:00:15 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-07-28 21:21:59 +0300
commitd0f5e61ab58892ecd3b0838adeea3cde330da3f1 (patch)
tree670466ad2dd5bda38156c7b584ab9e1b28fec6e3 /py/mpconfig.h
parent645582fe14b10daa938bcabd86054ea23ea9eb08 (diff)
downloadmicropython-d0f5e61ab58892ecd3b0838adeea3cde330da3f1.tar.gz
micropython-d0f5e61ab58892ecd3b0838adeea3cde330da3f1.zip
py: Implement __file__ attribute for modules.
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 99d697f9ad..bb1c0b5fe7 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -279,6 +279,11 @@ typedef double mp_float_t;
#define MICROPY_PY_BUILTINS_PROPERTY (1)
#endif
+// Whether to set __file__ for imported modules
+#ifndef MICROPY_PY___FILE__
+#define MICROPY_PY___FILE__ (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.