summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 17c5a770c4..56495d9156 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -4,6 +4,20 @@
#include <mpconfigport.h>
+#ifndef INT_FMT
+// printf format spec to use for machine_int_t and friends
+#ifdef __LP64__
+// Archs where machine_int_t == long, long != int
+#define UINT_FMT "%lu"
+#define INT_FMT "%ld"
+#else
+// Archs where machine_int_t == int
+#define UINT_FMT "%u"
+#define INT_FMT "%d"
+#endif
+#endif //INT_FMT
+
+
// Any options not explicitly set in mpconfigport.h will get default
// values below.
@@ -11,3 +25,9 @@
#ifndef MICROPY_MEM_STATS
#define MICROPY_MEM_STATS (1)
#endif
+
+// Whether to support slice object and correspondingly
+// slice subscript operators
+#ifndef MICROPY_ENABLE_SLICE
+#define MICROPY_ENABLE_SLICE (1)
+#endif