Skip to content

Commit eac485f

Browse files
Fix upstream, fix warnings
1 parent 70db5e9 commit eac485f

File tree

2 files changed

+69
-40
lines changed

2 files changed

+69
-40
lines changed

Python/generated_tail_call_handlers.c.h

Lines changed: 66 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/cases_generator/tier1_tail_call_generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def generate_label_handlers(infile: TextIO, outfile: TextIO) -> None:
3737
out = CWriter(outfile, 0, False)
3838
str_in = infile.read()
3939
# https://stackoverflow.com/questions/8303488/regex-to-match-any-character-including-new-lines
40-
eval_framedefault = re.findall("_PyEval_EvalFrameDefault\(.*\)\n({[\s\S]*\/\* END_BASE_INTERPRETER \*\/)", str_in)[0]
41-
function_protos = re.findall(f"{TARGET_LABEL}\((\w+)\):", eval_framedefault)
40+
eval_framedefault = re.findall(r"_PyEval_EvalFrameDefault\(.*\)\n({[\s\S]*\/\* END_BASE_INTERPRETER \*\/)", str_in)[0]
41+
function_protos = re.findall(rf"{TARGET_LABEL}\((\w+)\):", eval_framedefault)
4242
for proto in function_protos:
4343
out.emit(f"{function_proto(proto)};\n")
4444
out.emit("\n")
@@ -53,7 +53,7 @@ def generate_label_handlers(infile: TextIO, outfile: TextIO) -> None:
5353
for line in lines:
5454
if TARGET_LABEL in line:
5555
break
56-
if label := re.findall("goto (\w+);", line):
56+
if label := re.findall(r"goto (\w+);", line):
5757
out.emit(f"CEVAL_GOTO({label[0]});\n")
5858
else:
5959
out.emit_text(line)

0 commit comments

Comments
 (0)