Skip to content

Commit cae23fb

Browse files
authored
[mypyc] Attempt to fix Windows mypy wheel builds (#20730)
The `leave` attribute appears to cause a conflict with reserved C names in Windows. A better fix would be to fix name generation in mypyc, but this quick fix hopefully unblocks mypyc wheel builds. Context: #20722 (comment)
1 parent 5af25ce commit cae23fb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mypyc/irbuild/ll_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,7 +2986,7 @@ def __init__(
29862986
self.index = Register(start.type)
29872987
self.top = BasicBlock()
29882988
self.body = BasicBlock()
2989-
self.leave = BasicBlock()
2989+
self.loop_exit = BasicBlock()
29902990

29912991
def begin(self) -> None:
29922992
builder = self.builder
@@ -2995,11 +2995,11 @@ def begin(self) -> None:
29952995
op = ComparisonOp.SLT if self.signed else ComparisonOp.ULT
29962996
comp = ComparisonOp(self.index, self.end, op, line=-1)
29972997
builder.add(comp)
2998-
builder.add(Branch(comp, self.body, self.leave, Branch.BOOL))
2998+
builder.add(Branch(comp, self.body, self.loop_exit, Branch.BOOL))
29992999
builder.goto_and_activate(self.body)
30003000

30013001
def finish(self) -> None:
30023002
builder = self.builder
30033003
builder.assign(self.index, builder.int_add(self.index, self.step))
30043004
builder.goto(self.top)
3005-
builder.activate_block(self.leave)
3005+
builder.activate_block(self.loop_exit)

0 commit comments

Comments
 (0)