summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-01-22 16:19:32 +0000
committerDamien George <damien.p.george@gmail.com>2016-01-26 15:27:00 +0000
commita53af6c87540c41fdf34211ea99ee794cae6d160 (patch)
treeaf67226b9674b4643e318d53be2be117d8c52d0c /py/mpconfig.h
parentf5c42dd9d199aa61b16ad54a73531eefbb0be3eb (diff)
downloadmicropython-a53af6c87540c41fdf34211ea99ee794cae6d160.tar.gz
micropython-a53af6c87540c41fdf34211ea99ee794cae6d160.zip
extmod/modurandom: Add some extra random functions.
Functions added are: - randint - randrange - choice - random - uniform They are enabled with configuration variable MICROPY_PY_URANDOM_EXTRA_FUNCS, which is disabled by default. It is enabled for unix coverage build and stmhal.
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 72af343ddf..402e97acc2 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -787,6 +787,11 @@ typedef double mp_float_t;
#define MICROPY_PY_URANDOM (0)
#endif
+// Whether to include: randrange, randint, choice, random, uniform
+#ifndef MICROPY_PY_URANDOM_EXTRA_FUNCS
+#define MICROPY_PY_URANDOM_EXTRA_FUNCS (0)
+#endif
+
#ifndef MICROPY_PY_MACHINE
#define MICROPY_PY_MACHINE (0)
#endif