From d0f5e61ab58892ecd3b0838adeea3cde330da3f1 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 25 Jul 2014 11:00:15 +0300 Subject: py: Implement __file__ attribute for modules. --- py/mpconfig.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'py/mpconfig.h') diff --git a/py/mpconfig.h b/py/mpconfig.h index 99d697f9a..bb1c0b5fe 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. -- cgit v1.2.3