Skip to content

Commit f1e8f2b

Browse files
authored
Merge pull request adafruit#3554 from gamblor21/move_ordereddict
Moved ORDEREDDICT define to central location
2 parents b84f22a + f6f8956 commit f1e8f2b

File tree

9 files changed

+5
-9
lines changed

9 files changed

+5
-9
lines changed

ports/atmel-samd/mpconfigport.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
#define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
4444
#define SPI_FLASH_MAX_BAUDRATE 8000000
4545
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
46-
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
4746
#define MICROPY_PY_FUNCTION_ATTRS (0)
4847
// MICROPY_PY_UJSON depends on MICROPY_PY_IO
4948
#define MICROPY_PY_IO (0)
5049
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
5150
#define MICROPY_PY_UJSON (0)
51+
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
5252
#define MICROPY_PY_UERRNO_LIST \
5353
X(EPERM) \
5454
X(ENOENT) \
@@ -81,7 +81,6 @@
8181
#endif
8282
#define SPI_FLASH_MAX_BAUDRATE 24000000
8383
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1)
84-
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
8584
#define MICROPY_PY_FUNCTION_ATTRS (1)
8685
// MICROPY_PY_UJSON depends on MICROPY_PY_IO
8786
#define MICROPY_PY_IO (1)

ports/litex/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
#define CIRCUITPY_INTERNAL_NVM_SIZE (0)
3232
#define MICROPY_NLR_THUMB (0)
33-
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
3433
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
3534
#define MICROPY_PY_UBINASCII (1)
3635
#define MICROPY_PY_UJSON (1)

ports/mimxrt10xx/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ extern uint8_t _ld_default_stack_size;
4040
// 20kiB stack
4141
#define CIRCUITPY_DEFAULT_STACK_SIZE ((uint32_t) &_ld_default_stack_size)
4242
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
43-
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
4443
#define MICROPY_PY_FUNCTION_ATTRS (0)
4544
#define MICROPY_PY_IO (1)
4645
#define MICROPY_PY_UJSON (1)

ports/nrf/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include "nrf_sdm.h" // for SD_FLASH_SIZE
3535
#include "peripherals/nrf/nvm.h" // for FLASH_PAGE_SIZE
3636

37-
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
3837
#define MICROPY_PY_FUNCTION_ATTRS (1)
3938
#define MICROPY_PY_IO (1)
4039
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)

ports/stm/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
#include <stdint.h>
3232

33-
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
3433
#define MICROPY_PY_FUNCTION_ATTRS (1)
3534
#define MICROPY_PY_IO (1)
3635
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)

ports/unix/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
#define MICROPY_PY_SYS_STDFILES (1)
100100
#define MICROPY_PY_SYS_EXC_INFO (1)
101101
#define MICROPY_PY_COLLECTIONS_DEQUE (1)
102-
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
103102
#ifndef MICROPY_PY_MATH_SPECIAL_FUNCTIONS
104103
#define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (1)
105104
#endif

ports/unix/mpconfigport_coverage.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
#define MICROPY_VFS_FAT (1)
5050
#define MICROPY_FATFS_USE_LABEL (1)
5151
#define MICROPY_PY_FRAMEBUF (1)
52-
#define MICROPY_PY_COLLECTIONS_NAMEDTUPLE__ASDICT (1)
5352

5453
// TODO these should be generic, not bound to fatfs
5554
#define mp_type_fileio mp_type_vfs_posix_fileio

py/circuitpy_mpconfig.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ typedef long mp_off_t;
194194
#define MICROPY_PY_BUILTINS_STR_PARTITION (CIRCUITPY_FULL_BUILD)
195195
#define MICROPY_PY_BUILTINS_STR_SPLITLINES (CIRCUITPY_FULL_BUILD)
196196
#define MICROPY_PY_UERRNO (CIRCUITPY_FULL_BUILD)
197+
#ifndef MICROPY_PY_COLLECTIONS_ORDEREDDICT
198+
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (CIRCUITPY_FULL_BUILD)
199+
#endif
197200
// Opposite setting is deliberate.
198201
#define MICROPY_PY_UERRNO_ERRORCODE (!CIRCUITPY_FULL_BUILD)
199202
#ifndef MICROPY_PY_URE

py/objnamedtuple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ size_t mp_obj_namedtuple_find_field(const mp_obj_namedtuple_type_t *type, qstr n
4646
return (size_t)-1;
4747
}
4848

49-
#if MICROPY_PY_COLLECTIONS_NAMEDTUPLE__ASDICT
49+
#if MICROPY_PY_COLLECTIONS_ORDEREDDICT
5050
STATIC mp_obj_t namedtuple_asdict(mp_obj_t self_in) {
5151
mp_obj_namedtuple_t *self = MP_OBJ_TO_PTR(self_in);
5252
const qstr *fields = ((mp_obj_namedtuple_type_t*)self->tuple.base.type)->fields;

0 commit comments

Comments
 (0)