Merge pull request #3554 from gamblor21/move_ordereddict
Moved ORDEREDDICT define to central location
This commit is contained in:
commit
f1e8f2b404
@ -43,12 +43,12 @@
|
||||
#define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
|
||||
#define SPI_FLASH_MAX_BAUDRATE 8000000
|
||||
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
|
||||
#define MICROPY_PY_FUNCTION_ATTRS (0)
|
||||
// MICROPY_PY_UJSON depends on MICROPY_PY_IO
|
||||
#define MICROPY_PY_IO (0)
|
||||
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
|
||||
#define MICROPY_PY_UJSON (0)
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
|
||||
#define MICROPY_PY_UERRNO_LIST \
|
||||
X(EPERM) \
|
||||
X(ENOENT) \
|
||||
@ -81,7 +81,6 @@
|
||||
#endif
|
||||
#define SPI_FLASH_MAX_BAUDRATE 24000000
|
||||
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1)
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
||||
#define MICROPY_PY_FUNCTION_ATTRS (1)
|
||||
// MICROPY_PY_UJSON depends on MICROPY_PY_IO
|
||||
#define MICROPY_PY_IO (1)
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE (0)
|
||||
#define MICROPY_NLR_THUMB (0)
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
||||
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
|
||||
#define MICROPY_PY_UBINASCII (1)
|
||||
#define MICROPY_PY_UJSON (1)
|
||||
|
@ -40,7 +40,6 @@ extern uint8_t _ld_default_stack_size;
|
||||
// 20kiB stack
|
||||
#define CIRCUITPY_DEFAULT_STACK_SIZE ((uint32_t) &_ld_default_stack_size)
|
||||
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
|
||||
#define MICROPY_PY_FUNCTION_ATTRS (0)
|
||||
#define MICROPY_PY_IO (1)
|
||||
#define MICROPY_PY_UJSON (1)
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "nrf_sdm.h" // for SD_FLASH_SIZE
|
||||
#include "peripherals/nrf/nvm.h" // for FLASH_PAGE_SIZE
|
||||
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
||||
#define MICROPY_PY_FUNCTION_ATTRS (1)
|
||||
#define MICROPY_PY_IO (1)
|
||||
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
||||
#define MICROPY_PY_FUNCTION_ATTRS (1)
|
||||
#define MICROPY_PY_IO (1)
|
||||
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
|
||||
|
@ -99,7 +99,6 @@
|
||||
#define MICROPY_PY_SYS_STDFILES (1)
|
||||
#define MICROPY_PY_SYS_EXC_INFO (1)
|
||||
#define MICROPY_PY_COLLECTIONS_DEQUE (1)
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
||||
#ifndef MICROPY_PY_MATH_SPECIAL_FUNCTIONS
|
||||
#define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (1)
|
||||
#endif
|
||||
|
@ -49,7 +49,6 @@
|
||||
#define MICROPY_VFS_FAT (1)
|
||||
#define MICROPY_FATFS_USE_LABEL (1)
|
||||
#define MICROPY_PY_FRAMEBUF (1)
|
||||
#define MICROPY_PY_COLLECTIONS_NAMEDTUPLE__ASDICT (1)
|
||||
|
||||
// TODO these should be generic, not bound to fatfs
|
||||
#define mp_type_fileio mp_type_vfs_posix_fileio
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user