From 88c51c3592edc6c29fb0aad57c91e535793aa31b Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Tue, 16 May 2017 18:53:02 +1000
Subject: [PATCH] tools/mpy-tool.py: Fix regression with freezing floats in obj
 repr C.

Regression was introduced by ec534609f665cb791b8fc1eae1a44e514c297659
---
 tools/mpy-tool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py
index 483a992db..544f90cc8 100755
--- a/tools/mpy-tool.py
+++ b/tools/mpy-tool.py
@@ -343,7 +343,7 @@ class RawCode:
                 print('#elif MICROPY_OBJ_REPR == MICROPY_OBJ_REPR_C')
                 n = struct.unpack('<I', struct.pack('<f', self.objs[i]))[0]
                 n = ((n & ~0x3) | 2) + 0x80800000
-                print('    MP_ROM_INT(0x%08x),' % (n,))
+                print('    (mp_rom_obj_t)(0x%08x),' % (n,))
                 print('#else')
                 print('#error "MICROPY_OBJ_REPR_D not supported with floats in frozen mpy files"')
                 print('#endif')
-- 
GitLab