diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-04 15:07:17 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-04 15:07:17 +0100 |
commit | 36f0ee1a5469cf4cb1d76f2613476644625cbc05 (patch) | |
tree | fd5bc8dffa6c4d29bf7e19c968b4e6a14c2913fc /py/builtin.c | |
parent | bd17e1b3ae1b256a718ed09ad1673f5eb913467d (diff) | |
download | micropython-36f0ee1a5469cf4cb1d76f2613476644625cbc05.tar.gz micropython-36f0ee1a5469cf4cb1d76f2613476644625cbc05.zip |
py: Remove mp_obj_less (use mp_binary_op(MP_BINARY_OP_LESS..) instead).
Diffstat (limited to 'py/builtin.c')
-rw-r--r-- | py/builtin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/py/builtin.c b/py/builtin.c index 67b0e46a66..145bc65b14 100644 --- a/py/builtin.c +++ b/py/builtin.c @@ -231,7 +231,7 @@ STATIC mp_obj_t mp_builtin_max(uint n_args, const mp_obj_t *args) { mp_obj_t max_obj = NULL; mp_obj_t item; while ((item = mp_iternext(iterable)) != MP_OBJ_NULL) { - if (max_obj == NULL || mp_obj_less(max_obj, item)) { + if (max_obj == NULL || mp_binary_op(MP_BINARY_OP_LESS, max_obj, item)) { max_obj = item; } } @@ -243,7 +243,7 @@ STATIC mp_obj_t mp_builtin_max(uint n_args, const mp_obj_t *args) { // given many args mp_obj_t max_obj = args[0]; for (int i = 1; i < n_args; i++) { - if (mp_obj_less(max_obj, args[i])) { + if (mp_binary_op(MP_BINARY_OP_LESS, max_obj, args[i])) { max_obj = args[i]; } } @@ -260,7 +260,7 @@ STATIC mp_obj_t mp_builtin_min(uint n_args, const mp_obj_t *args) { mp_obj_t min_obj = NULL; mp_obj_t item; while ((item = mp_iternext(iterable)) != MP_OBJ_NULL) { - if (min_obj == NULL || mp_obj_less(item, min_obj)) { + if (min_obj == NULL || mp_binary_op(MP_BINARY_OP_LESS, item, min_obj)) { min_obj = item; } } @@ -272,7 +272,7 @@ STATIC mp_obj_t mp_builtin_min(uint n_args, const mp_obj_t *args) { // given many args mp_obj_t min_obj = args[0]; for (int i = 1; i < n_args; i++) { - if (mp_obj_less(args[i], min_obj)) { + if (mp_binary_op(MP_BINARY_OP_LESS, args[i], min_obj)) { min_obj = args[i]; } } |