8000 GH-122155: Fix cases generator to correctly compute 'peek' offset for error handling by markshannon · Pull Request #122158 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
< 8000 h1 class="gh-header-title mb-2 lh-condensed f1 mr-0 flex-auto wb-break-word"> GH-122155: Fix cases generator to correctly compute 'peek' offset for error handling #122158
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add type annotations
  • Loading branch information
markshannon committed Jul 23, 2024
commit 405f084107181678005877a807694eef9f40fba8
4 changes: 2 additions & 2 deletions Tools/cases_generator/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class StackOffset:
def empty() -> "StackOffset":
return StackOffset([], [])

def copy(self):
def copy(self) -> "StackOffset":
return StackOffset(self.popped[:], self.pushed[:])

def pop(self, item: StackItem) -> None:
Expand Down Expand Up @@ -212,7 +212,7 @@ def flush(self, out: CWriter, cast_type: str = "uintptr_t", extract_bits: bool =
self.top_offset.clear()
out.start_line()

def peek_offset(self):
def peek_offset(self) -> str:
peek = self.base_offset.copy()
for var in self.variables:
if not var.peek:
Expand Down
Loading
0