diff options
author | Damien George <damien.p.george@gmail.com> | 2018-04-04 14:24:03 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-04-04 14:24:03 +1000 |
commit | 3f420c0c27bd6daa5af39517925be55b9b9a9ab3 (patch) | |
tree | e5b2da7eae2a600dc1580e0e4baed9efe6f14f4c /py/mpstate.h | |
parent | 323b5f7270ee0e3c9000c0fb0d5f74ec049337c2 (diff) |
py: Don't include mp_optimise_value or opt_level() if compiler disabled.
Without the compiler enabled the mp_optimise_value is unused, and the
micropython.opt_level() function is not useful, so exclude these from the
build to save RAM and code size.
Diffstat (limited to 'py/mpstate.h')
-rw-r--r-- | py/mpstate.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index 816698f4e..16c4bf6c5 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -199,7 +199,9 @@ typedef struct _mp_state_vm_t { mp_thread_mutex_t qstr_mutex; #endif + #if MICROPY_ENABLE_COMPILER mp_uint_t mp_optimise_value; + #endif // size of the emergency exception buf, if it's dynamically allocated #if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF && MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE == 0 |