Skip to content

Commit

Permalink
fix: stack_elems1 undefined in release builds (python#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fidget-Spinner authored Jun 4, 2023
1 parent 197c0c9 commit 3fd00f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/tier2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2723,12 +2723,12 @@ typecontext_is_compatible(_PyTier2TypeContext *ctx1, _PyTier2TypeContext *ctx2)
// 1. Check that the trees are the same "shape" and equivalent. This allows
// ctx1's trees to be a subtree of ctx2.
// 2. Check that the trees resolve to the same root type.
int stack_elems1 = (int)(ctx1->type_stack_ptr - ctx1->type_stack);

#ifdef Py_DEBUG
// These should be true during runtime
assert(ctx1->type_locals_len == ctx2->type_locals_len);
assert(ctx1->type_stack_len == ctx2->type_stack_len);
int stack_elems1 = (int)(ctx1->type_stack_ptr - ctx1->type_stack);
int stack_elems2 = (int)(ctx2->type_stack_ptr - ctx2->type_stack);
assert(stack_elems1 == stack_elems2);
#endif
Expand Down

0 comments on commit 3fd00f7

Please sign in to comment.