summaryrefslogtreecommitdiff
path: root/py/objstr.c
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/objstr.c
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/objstr.c')
-rw-r--r--py/objstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 60a26d45b..70de0a693 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -236,7 +236,7 @@ STATIC mp_obj_t bytes_make_new(const mp_obj_type_t *type_in, size_t n_args, size
mp_obj_t item;
while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
mp_int_t val = mp_obj_get_int(item);
- #if MICROPY_CPYTHON_COMPAT
+ #if MICROPY_FULL_CHECKS
if (val < 0 || val > 255) {
mp_raise_ValueError("bytes value out of range");
}