diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2008-08-07 11:27:27 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2008-08-07 11:27:27 (GMT) |
commit | 15dff7716f39d8df807b873b3e29f2955c5855ca (patch) | |
tree | 89bd239b32eea37c060dcf276f629fdaef2cfa82 /generic/tclExecute.c | |
parent | 62d36886b926591b14c230558c64c8ccc85cbb82 (diff) | |
download | tcl-15dff7716f39d8df807b873b3e29f2955c5855ca.zip tcl-15dff7716f39d8df807b873b3e29f2955c5855ca.tar.gz tcl-15dff7716f39d8df807b873b3e29f2955c5855ca.tar.bz2 |
small modif of last commit
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 614a3d9..e9f3939 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,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.399 2008/08/07 04:13:51 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.400 2008/08/07 11:27:27 msofer Exp $ */ #include "tclInt.h" @@ -7821,21 +7821,18 @@ TclExecuteByteCode( if (atExitPtr) { - /* - * Find the last one - */ - - TEOV_callback *lastPtr = atExitPtr; - while (lastPtr->nextPtr) { - lastPtr = lastPtr->nextPtr; - } - NRE_ASSERT(lastPtr->nextPtr == NULL); if (!isTailcall) { /* save the interp state, arrange for restoring it after running the callbacks. Put the callback at the bottom of the atExit stack */ Tcl_InterpState state = Tcl_SaveInterpState(interp, result); + TEOV_callback *lastPtr = atExitPtr; + + while (lastPtr->nextPtr) { + lastPtr = lastPtr->nextPtr; + } + NRE_ASSERT(lastPtr->nextPtr == NULL); TclNRAddCallback(interp, NRRestoreInterpState, state, NULL, NULL, NULL); |