summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/moductypes.c
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2020-03-31 14:48:08 +0200
committerDamien George <damien.p.george@gmail.com>2020-04-18 22:42:24 +1000
commitbcf01d1686a8fa6d257daea25ce0d7df6e4ad839 (patch)
tree2513c71e685ead21c6ca44a0432500ca75c424f8 /extmod/moductypes.c
parentdc4d119d3d96799bf848c6488b2ac49b933ab7cb (diff)
downloadmicropython-bcf01d1686a8fa6d257daea25ce0d7df6e4ad839.tar.gz
micropython-bcf01d1686a8fa6d257daea25ce0d7df6e4ad839.zip
all: Fix implicit conversion from double to float.
These are found when building with -Wfloat-conversion.
Diffstat (limited to 'extmod/moductypes.c')
-rw-r--r--extmod/moductypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index cdbf49ad40..e12b05f962 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -362,7 +362,7 @@ STATIC mp_obj_t get_aligned(uint val_type, void *p, mp_int_t index) {
case FLOAT32:
return mp_obj_new_float_from_f(((float *)p)[index]);
case FLOAT64:
- return mp_obj_new_float(((double *)p)[index]);
+ return mp_obj_new_float_from_d(((double *)p)[index]);
#endif
default:
assert(0);