]> granicus.if.org Git - python/commitdiff
use stack altering macros here
authorBenjamin Peterson <benjamin@python.org>
Sun, 28 Jun 2009 16:21:52 +0000 (16:21 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 28 Jun 2009 16:21:52 +0000 (16:21 +0000)
Python/ceval.c

index a5d465cff22921dd1617e6cf6ea073960dfbf158..6141c13d002cfe27cdb24a5a9133c9eab6accaf3 100644 (file)
@@ -2537,14 +2537,14 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                                v = SECOND();
                                w = THIRD();
                                tp = FOURTH();
-                               exc = stack_pointer[-5];
-                               tb = stack_pointer[-6];
-                               exit_func = stack_pointer[-7];
-                               stack_pointer[-7] = tb;
-                               stack_pointer[-6] = exc;
-                               stack_pointer[-5] = tp;
+                               exc = PEEK(5);
+                               tb = PEEK(6);
+                               exit_func = PEEK(7);
+                               SET_VALUE(7, tb);
+                               SET_VALUE(6, exc);
+                               SET_VALUE(5, tp);
                                /* UNWIND_EXCEPT_BLOCK will pop this off. */
-                               FOURTH() = NULL;
+                               SET_FOURTH(NULL);
                                /* We just shifted the stack down, so we have
                                   to tell the except handler block that the
                                   values are lower than it expects. */