diff options
| author | Dan Halbert <halbert@adafruit.com> | 2020-10-14 22:39:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-14 22:39:04 -0400 |
| commit | f1e8f2b404ef45edf08b019c1e68d595aa69b357 (patch) | |
| tree | 0a8292c9d01bb06fa2dcc12d9d0ba364774713e9 /py | |
| parent | b84f22aa0c404cfd83eab5f15f1415b27f508ae8 (diff) | |
| parent | f6f89565d83c0ac942496f29394ff59976aaa5b9 (diff) | |
Merge pull request #3554 from gamblor21/move_ordereddict
Moved ORDEREDDICT define to central location
Diffstat (limited to 'py')
| -rw-r--r-- | py/circuitpy_mpconfig.h | 3 | ||||
| -rw-r--r-- | py/objnamedtuple.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 5ffdd4c8f..1e01bd9c5 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -194,6 +194,9 @@ typedef long mp_off_t; #define MICROPY_PY_BUILTINS_STR_PARTITION (CIRCUITPY_FULL_BUILD) #define MICROPY_PY_BUILTINS_STR_SPLITLINES (CIRCUITPY_FULL_BUILD) #define MICROPY_PY_UERRNO (CIRCUITPY_FULL_BUILD) +#ifndef MICROPY_PY_COLLECTIONS_ORDEREDDICT +#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (CIRCUITPY_FULL_BUILD) +#endif // Opposite setting is deliberate. #define MICROPY_PY_UERRNO_ERRORCODE (!CIRCUITPY_FULL_BUILD) #ifndef MICROPY_PY_URE diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c index 6c36909e7..ab2f2f3c0 100644 --- a/py/objnamedtuple.c +++ b/py/objnamedtuple.c @@ -46,7 +46,7 @@ size_t mp_obj_namedtuple_find_field(const mp_obj_namedtuple_type_t *type, qstr n return (size_t)-1; } -#if MICROPY_PY_COLLECTIONS_NAMEDTUPLE__ASDICT +#if MICROPY_PY_COLLECTIONS_ORDEREDDICT STATIC mp_obj_t namedtuple_asdict(mp_obj_t self_in) { mp_obj_namedtuple_t *self = MP_OBJ_TO_PTR(self_in); const qstr *fields = ((mp_obj_namedtuple_type_t*)self->tuple.base.type)->fields; |
