tools/mpy-tool.py: Fix static qstrs when freezing without qstr header.

It's rare to freeze .mpy files without specifying a qstr header from a
firmware build, but it can be useful for testing, eg
`mpy-tool.py -f test.mpy`.  Fix this case so static qstrs are properly
excluded from the frozen qstr list.

Signed-off-by: Damien George <damien@micropython.org>
pull/12429/head^2
Damien George 2024-02-12 11:56:24 +11:00
rodzic abe43fe687
commit 0432f73206
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1795,7 +1795,7 @@ def main():
else:
config.MICROPY_QSTR_BYTES_IN_LEN = 1
config.MICROPY_QSTR_BYTES_IN_HASH = 1
firmware_qstr_idents = set(qstrutil.static_qstr_list)
firmware_qstr_idents = set(qstrutil.static_qstr_list_ident)
# Create initial list of global qstrs.
global_qstrs = GlobalQStrList()