Skip to content

Commit 3fd00f7

Browse files
fix: stack_elems1 undefined in release builds (python#20)
1 parent 197c0c9 commit 3fd00f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/tier2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2723,12 +2723,12 @@ typecontext_is_compatible(_PyTier2TypeContext *ctx1, _PyTier2TypeContext *ctx2)
27232723
// 1. Check that the trees are the same "shape" and equivalent. This allows
27242724
// ctx1's trees to be a subtree of ctx2.
27252725
// 2. Check that the trees resolve to the same root type.
2726+
int stack_elems1 = (int)(ctx1->type_stack_ptr - ctx1->type_stack);
27262727

27272728
#ifdef Py_DEBUG
27282729
// These should be true during runtime
27292730
assert(ctx1->type_locals_len == ctx2->type_locals_len);
27302731
assert(ctx1->type_stack_len == ctx2->type_stack_len);
2731-
int stack_elems1 = (int)(ctx1->type_stack_ptr - ctx1->type_stack);
27322732
int stack_elems2 = (int)(ctx2->type_stack_ptr - ctx2->type_stack);
27332733
assert(stack_elems1 == stack_elems2);
27342734
#endif

0 commit comments

Comments
 (0)