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
99ab64ff
Commit
99ab64ff
authored
Jan 11, 2015
by
Damien George
Browse files
py/makeqstrdata.py: Make it work again with both Python2 and Python3.
parent
95836f84
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/makeqstrdata.py
View file @
99ab64ff
...
...
@@ -92,7 +92,7 @@ def do_work(infiles):
if
qlen
>=
cfg_max_len
:
print
(
'qstr is too long:'
,
qstr
)
assert
False
qlen_str
=
(
'
\\
x%02x'
*
cfg_bytes_len
)
%
tuple
(
qlen
.
to_bytes
(
cfg_bytes_len
,
'little'
))
qlen_str
=
(
'
\\
x%02x'
*
cfg_bytes_len
)
%
tuple
(
((
qlen
>>
(
8
*
i
))
&
0xff
)
for
i
in
range
(
cfg_bytes_len
))
print
(
'QDEF(MP_QSTR_%s, (const byte*)"
\\
x%02x
\\
x%02x%s" "%s")'
%
(
ident
,
qhash
&
0xff
,
(
qhash
>>
8
)
&
0xff
,
qlen_str
,
qdata
))
return
True
...
...
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