Skip to content

Commit b1715f1

Browse files
committed
use stack altering macros here
1 parent 6d46a91 commit b1715f1

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Python/ceval.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,14 +2537,14 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
25372537
v = SECOND();
25382538
w = THIRD();
25392539
tp = FOURTH();
2540-
exc = stack_pointer[-5];
2541-
tb = stack_pointer[-6];
2542-
exit_func = stack_pointer[-7];
2543-
stack_pointer[-7] = tb;
2544-
stack_pointer[-6] = exc;
2545-
stack_pointer[-5] = tp;
2540+
exc = PEEK(5);
2541+
tb = PEEK(6);
2542+
exit_func = PEEK(7);
2543+
SET_VALUE(7, tb);
2544+
SET_VALUE(6, exc);
2545+
SET_VALUE(5, tp);
25462546
/* UNWIND_EXCEPT_BLOCK will pop this off. */
2547-
FOURTH() = NULL;
2547+
SET_FOURTH(NULL);
25482548
/* We just shifted the stack down, so we have
25492549
to tell the except handler block that the
25502550
values are lower than it expects. */

0 commit comments

Comments
 (0)