diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-25 12:19:33 +0100 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-26 01:00:33 +0100 |
| commit | 062fac1d43d42b35e0ecdaaec124c29b65db7c68 (patch) | |
| tree | ab2b653796caea6d368ae793e07e5382b0759bab /py/objnamedtuple.c | |
| parent | 3fd19c60ccd879ed676bae72d42b709b34eeaa23 (diff) | |
atmel-samd: Use link time optimization to reduce code size of builds which
share space with the file system.
"Express" builds with SPI flash crash the compiler for some reason so its
currently disabled for them.
Diffstat (limited to 'py/objnamedtuple.c')
| -rw-r--r-- | py/objnamedtuple.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c index 19fd3c5db..f0134d9be 100644 --- a/py/objnamedtuple.c +++ b/py/objnamedtuple.c @@ -125,7 +125,11 @@ mp_obj_t namedtuple_make_new(const mp_obj_type_t *type_in, size_t n_args, size_t return MP_OBJ_FROM_PTR(tuple); } -const mp_rom_obj_tuple_t namedtuple_base_tuple = {{&mp_type_tuple}, 1, {MP_ROM_PTR(&mp_type_tuple)}}; +const mp_rom_obj_tuple1_t namedtuple_base_tuple = { + .base = {&mp_type_tuple}, + .len = 1u, + .items = {MP_OBJ_FROM_PTR(&mp_type_tuple)} +}; STATIC mp_obj_t mp_obj_new_namedtuple_type(qstr name, mp_uint_t n_fields, mp_obj_t *fields) { mp_obj_namedtuple_type_t *o = m_new_obj_var(mp_obj_namedtuple_type_t, qstr, n_fields); |
