summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclExecute.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 1f2a3df..eb077b6 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.298 2007/06/18 22:51:11 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.299 2007/06/19 19:50:10 msofer Exp $
*/
#include "tclInt.h"
@@ -669,6 +669,12 @@ GrowEvaluationStack(
return markerPtr + 1;
}
} else if (needed < 0) {
+ /*
+ * Put a marker pointing to the previous marker in this stack, and
+ * store it in esPtr as the current marker. Return a pointer to one
+ * word past the marker.
+ */
+
esPtr->markerPtr = ++esPtr->tosPtr;
*esPtr->markerPtr = (Tcl_Obj *) markerPtr;
return esPtr->markerPtr + 1;
@@ -730,6 +736,12 @@ GrowEvaluationStack(
newStackReady:
eePtr->execStackPtr = esPtr;
+ /*
+ * Store a NULL marker at the beginning of the stack, to indicate that
+ * this is the first marker in this stack and that rewinding to here
+ * should actually be a return to the previous stack.
+ */
+
esPtr->stackWords[0] = NULL;
esPtr->markerPtr = esPtr->tosPtr = &esPtr->stackWords[0];