Skip to content

Commit

Permalink
Skip if statement for always true case
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Jul 16, 2023
1 parent 5574c5e commit 17fc8a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tools/cases_generator/generate_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def assign(self, dst: StackEffect, src: StackEffect):
self.emit(f"Py_XSETREF({dst.name}, {cast}{src.name});")
else:
stmt = f"{dst.name} = {cast}{src.name};"
if src.cond:
if src.cond and src.cond != "1":
if src.cond == "0":
# It will not be executed
return
Expand Down

0 comments on commit 17fc8a3

Please sign in to comment.