Don't generate QSTRs for wrong identifiers

MP_REGISTER_MODULE would use identifiers like
"MODULE_DEF_MP_QSTR___FUTURE__" which would in turn cause
a QSTR to be generated for it. This wasn't desirable, because the
qstr would never be used.

This clears out quite a bit of flash storage on the proxlight trinkey.
This commit is contained in:
Jeff Epler 2022-11-08 11:21:03 -06:00
parent 2f5ec1cab0
commit 10d92873c3
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ import subprocess
from makeqstrdefs import qstr_unescape, QSTRING_BLOCK_LIST
re_line = re.compile(r"#[line]*\s(\d+)\s\"([^\"]+)\"", re.DOTALL)
re_qstr = re.compile(r"MP_QSTR_[_a-zA-Z0-9]+", re.DOTALL)
re_qstr = re.compile(r"\bMP_QSTR_[_a-zA-Z0-9]+", re.DOTALL)
re_translate = re.compile(r"translate\(\"((?:(?=(\\?))\2.)*?)\"\)", re.DOTALL)