8000 tools/mpy-tool.py: Fix regression with freezing floats in obj repr C. · micropython/micropython-esp32@88c51c3 · GitHub
[go: up one dir, main page]

Skip to content 8000
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 88c51c3

Browse files
committed
tools/mpy-tool.py: Fix regression with freezing floats in obj repr C.
Regression was introduced by ec53460
1 parent a004554 commit 88c51c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/mpy-tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def freeze(self, parent_name):
343343
print('#elif MICROPY_OBJ_REPR == MICROPY_OBJ_REPR_C')
344344
n = struct.unpack('<I', struct.pack('<f', self.objs[i]))[0]
345345
n = ((n & ~0x3) | 2) + 0x80800000
346-
print(' MP_ROM_INT(0x%08x),' % (n,))
346+
print(' (mp_rom_obj_t)(0x%08x),' % (n,))
347347
print('#else')
348348
print('#error "MICROPY_OBJ_REPR_D not supported with floats in frozen mpy files"')
349349
print('#endif')

0 commit comments

Comments
 (0)
0