diff options
author | dgp <dgp@users.sourceforge.net> | 2003-05-05 20:54:37 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2003-05-05 20:54:37 (GMT) |
commit | 0141bbbd2f31ab6734963fd5e653f1a5a93b646d (patch) | |
tree | 333cb75d8427317c3ad375ecbbf91791916f6817 /generic/tclExecute.c | |
parent | 5940eaeb9273d7c2c5eaa2e9db99cf403eb3a8fa (diff) | |
download | tcl-0141bbbd2f31ab6734963fd5e653f1a5a93b646d.zip tcl-0141bbbd2f31ab6734963fd5e653f1a5a93b646d.tar.gz tcl-0141bbbd2f31ab6734963fd5e653f1a5a93b646d.tar.bz2 |
* generic/tclBasic.c: Implementation of TIP 90, which
* generic/tclCmdAH.c: extends the [catch] and [return]
* generic/tclCompCmds.c: commands to enable creation of a
* generic/tclExecute.c: proc that is a replacement for
* generic/tclInt.h: [return]. [Patch 531640]
* generic/tclProc.c:
* generic/tclResult.c:
* tests/cmdAH.test:
* tests/cmdMZ.test:
* tests/error.test:
* tests/proc-old.test:
* library/tcltest/tcltest.tcl: The -returnCodes option to [test]
failed to recognize the symbolic name "ok" for return code 0.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 3d324a5..0697677 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -11,7 +11,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.100 2003/04/28 12:34:25 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.101 2003/05/05 20:54:39 dgp Exp $ */ #include "tclInt.h" @@ -975,6 +975,11 @@ TclCompEvalObj(interp, objPtr) */ codePtr->refCount++; + if (iPtr->returnOpts != iPtr->defaultReturnOpts) { + Tcl_DecrRefCount(iPtr->returnOpts); + iPtr->returnOpts = iPtr->defaultReturnOpts; + Tcl_IncrRefCount(iPtr->returnOpts); + } iPtr->numLevels++; result = TclExecuteByteCode(interp, codePtr); iPtr->numLevels--; @@ -1196,7 +1201,11 @@ TclExecuteByteCode(interp, codePtr) #endif switch (*pc) { case INST_RETURN: - iPtr->returnCode = TCL_OK; + if (iPtr->returnOpts != iPtr->defaultReturnOpts) { + Tcl_DecrRefCount(iPtr->returnOpts); + iPtr->returnOpts = iPtr->defaultReturnOpts; + Tcl_IncrRefCount(iPtr->returnOpts); + } result = TCL_RETURN; case INST_DONE: if (stackTop <= initStackTop) { |