makeqstrdef: restore CIRCUITPY behavior

this fixes the qrio test, among others
This commit is contained in:
Jeff Epler 2023-10-02 08:50:47 -05:00
parent 1ccce65311
commit 18a5a897f1
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -160,7 +160,8 @@ def process_file(f):
for match in re_match.findall(line):
if args.mode == _MODE_QSTR:
name = match.replace("MP_QSTR_", "")
output.append("Q(" + name + ")")
# CIRCUITPY: undo character escapes in qstrs in C code
output.append("Q(" + qstr_unescape(name) + ")")
elif args.mode in (_MODE_COMPRESS, _MODE_MODULE, _MODE_ROOT_POINTER):
output.append(match)