summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorNicko van Someren <nicko@nicko.org>2017-02-01 16:41:22 -0700
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-02-02 22:23:10 +0300
commitdf0117c8ae213a0652c3b19a969edc7fd994eeab (patch)
tree015d209752d8277e9bcd970b10a08556f438b386 /py/mpconfig.h
parent2486c4ff469fdb69555476e342eadda91a4ceadf (diff)
py: Added optimised support for 3-argument calls to builtin.pow()
Updated modbuiltin.c to add conditional support for 3-arg calls to pow() using MICROPY_PY_BUILTINS_POW3 config parameter. Added support in objint_mpz.c for for optimised implementation.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 993ad1db8..13af4c62b 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -490,6 +490,11 @@
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
#endif
+// Support for calls to pow() with 3 integer arguments
+#ifndef MICROPY_PY_BUILTINS_POW3
+#define MICROPY_PY_BUILTINS_POW3 (0)
+#endif
+
#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_LONGLONG
typedef long long mp_longint_impl_t;
#endif