From 627ba381545b73a383b9e56a4b29c03ac5914a4d Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 22 Jun 2022 10:37:48 +1000 Subject: py/parsenum: Optimise when building with complex disabled. To reduce code size when MICROPY_PY_BUILTINS_COMPLEX is disabled. Signed-off-by: Damien George --- py/objfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objfloat.c') 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]; -- cgit v1.2.3