summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-04-02 21:20:07 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-04-02 21:20:07 +0300
commit9a973977bbba8fda284bbc6eca4991fe0fd1d5ac (patch)
tree94c852c2b4d18f39d9ebcb8666a551152647b320 /py/mpconfig.h
parent5b2db4bb51548ce5f20b5f3fa5890c50514ec884 (diff)
py/objstr: Use MICROPY_FULL_CHECKS for range checking when constructing bytes.
Split this setting from MICROPY_CPYTHON_COMPAT. The idea is to be able to keep MICROPY_CPYTHON_COMPAT disabled, but still pass more of regression testsuite. In particular, this fixes last failing test in basics/ for Zephyr port.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 9c89fc18a..06c19f72b 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -556,6 +556,15 @@ typedef double mp_float_t;
#define MICROPY_CPYTHON_COMPAT (1)
#endif
+// Perform full checks as done by CPython. Disabling this
+// may produce incorrect results, if incorrect data is fed,
+// but should not lead to MicroPython crashes or similar
+// grave issues (in other words, only user app should be,
+// affected, not system).
+#ifndef MICROPY_FULL_CHECKS
+#define MICROPY_FULL_CHECKS (1)
+#endif
+
// Whether POSIX-semantics non-blocking streams are supported
#ifndef MICROPY_STREAMS_NON_BLOCK
#define MICROPY_STREAMS_NON_BLOCK (0)