Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
88c51c35
Commit
88c51c35
authored
May 16, 2017
by
Damien George
Browse files
tools/mpy-tool.py: Fix regression with freezing floats in obj repr C.
Regression was introduced by
ec534609
parent
a004554d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/mpy-tool.py
View file @
88c51c35
...
...
@@ -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'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment