diff options
author | Damien George <damien.p.george@gmail.com> | 2014-12-27 17:07:16 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-12-27 17:33:30 +0000 |
commit | e37dcaafb43c1246ab55d79ebb8889a61f280533 (patch) | |
tree | 79b86304793ac4d2396c7bc8a24209459e3eaf1a /py/modbuiltins.c | |
parent | 3b74c91684e6dfc785bf33ba03e520470f59059e (diff) | |
download | micropython-e37dcaafb43c1246ab55d79ebb8889a61f280533.tar.gz micropython-e37dcaafb43c1246ab55d79ebb8889a61f280533.zip |
py: Allow to properly disable builtin "set" object.
This patch makes MICROPY_PY_BUILTINS_SET compile-time option fully
disable the builtin set object (when set to 0). This includes removing
set constructor/comprehension from the grammar, the compiler and the
emitters. Now, enabling set costs 8168 bytes on unix x64, and 3576
bytes on stmhal.
Diffstat (limited to 'py/modbuiltins.c')
-rw-r--r-- | py/modbuiltins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/modbuiltins.c b/py/modbuiltins.c index c0b3b8a86b..7ac22fc49f 100644 --- a/py/modbuiltins.c +++ b/py/modbuiltins.c @@ -583,7 +583,7 @@ STATIC const mp_map_elem_t mp_module_builtins_globals_table[] = { #if MICROPY_PY_BUILTINS_FLOAT { MP_OBJ_NEW_QSTR(MP_QSTR_float), (mp_obj_t)&mp_type_float }, #endif -#if MICROPY_PY_BUILTINS_FROZENSET +#if MICROPY_PY_BUILTINS_SET && MICROPY_PY_BUILTINS_FROZENSET { MP_OBJ_NEW_QSTR(MP_QSTR_frozenset), (mp_obj_t)&mp_type_frozenset }, #endif { MP_OBJ_NEW_QSTR(MP_QSTR_int), (mp_obj_t)&mp_type_int }, |