aboutsummaryrefslogtreecommitdiff
path: root/unix
diff options
context:
space:
mode:
authorPaul Sokolovsky2015-03-18 01:25:04 +0200
committerDamien George2015-03-20 17:26:10 +0000
commit0ef01d0a75b8b2f48a72f0041e048a390b9e75b6 (patch)
tree2d32b82d34d026ac59b9724ea5323612bc09b67d /unix
parent1004535237e8edc5ec671ab8bea6fd2150139c54 (diff)
py: Implement core of OrderedDict type.
Given that there's already support for "fixed table" maps, which are essentially ordered maps, the implementation of OrderedDict just extends "fixed table" maps by adding an "is ordered" flag and add/remove operations, and reuses 95% of objdict code, just making methods tolerant to both dict and OrderedDict. Some things are missing so far, like CPython-compatible repr and comparison. OrderedDict is Disabled by default; enabled on unix and stmhal ports.
Diffstat (limited to 'unix')
-rw-r--r--unix/mpconfigport.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h
index c8ba26897..a7ebf21ed 100644
--- a/unix/mpconfigport.h
+++ b/unix/mpconfigport.h
@@ -68,6 +68,7 @@
#define MICROPY_PY_SYS_PLATFORM "linux"
#define MICROPY_PY_SYS_MAXSIZE (1)
#define MICROPY_PY_SYS_STDFILES (1)
+#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
#define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (1)
#define MICROPY_PY_CMATH (1)
#define MICROPY_PY_IO_FILEIO (1)