summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-12 17:30:48 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-12 22:04:21 +0200
commit48b3572f7eb70a1af97f008d342ee266fdfc0717 (patch)
tree96790fc5b06a9f573dd8d50bc07e54348c1c549c /py/mpconfig.h
parent80f60e1aee8c427c942a867b4c2cde48566bdc19 (diff)
downloadmicropython-48b3572f7eb70a1af97f008d342ee266fdfc0717.tar.gz
micropython-48b3572f7eb70a1af97f008d342ee266fdfc0717.zip
Add framework to support alternative implementations of long int Python type.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 6deb442b8d..ada4aa2ea4 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -62,6 +62,18 @@
#define MICROPY_ENABLE_LEXER_UNIX (0)
#endif
+// Long int implementation
+#define MICROPY_LONGINT_IMPL_NONE (0)
+#define MICROPY_LONGINT_IMPL_LONGLONG (1)
+
+#ifndef MICROPY_LONGINT_IMPL
+#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
+#endif
+
+#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_LONGLONG
+typedef long long mp_longint_impl_t;
+#endif
+
// Whether to support float and complex types
#ifndef MICROPY_ENABLE_FLOAT
#define MICROPY_ENABLE_FLOAT (0)