diff options
author | Damien George <damien@micropython.org> | 2022-06-22 10:37:48 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-06-23 11:46:47 +1000 |
commit | 627ba381545b73a383b9e56a4b29c03ac5914a4d (patch) | |
tree | d667515be03eb09cda47310bae544ee1e92bee4f /py/objfloat.c | |
parent | 61ce260ff73b1191a9190c8cac7a7a1bd5b2f274 (diff) | |
download | micropython-627ba381545b73a383b9e56a4b29c03ac5914a4d.tar.gz micropython-627ba381545b73a383b9e56a4b29c03ac5914a4d.zip |
py/parsenum: Optimise when building with complex disabled.
To reduce code size when MICROPY_PY_BUILTINS_COMPLEX is disabled.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/objfloat.c')
-rw-r--r-- | py/objfloat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objfloat.c b/py/objfloat.c index 0855baac83..8e89b3da37 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -137,7 +137,7 @@ STATIC mp_obj_t float_make_new(const mp_obj_type_t *type_in, size_t n_args, size mp_buffer_info_t bufinfo; if (mp_get_buffer(args[0], &bufinfo, MP_BUFFER_READ)) { // a textual representation, parse it - return mp_parse_num_decimal(bufinfo.buf, bufinfo.len, false, false, NULL); + return mp_parse_num_float(bufinfo.buf, bufinfo.len, false, NULL); } else if (mp_obj_is_float(args[0])) { // a float, just return it return args[0]; |