summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-05-05 20:54:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-05-05 20:54:37 (GMT)
commit0141bbbd2f31ab6734963fd5e653f1a5a93b646d (patch)
tree333cb75d8427317c3ad375ecbbf91791916f6817 /generic/tclResult.c
parent5940eaeb9273d7c2c5eaa2e9db99cf403eb3a8fa (diff)
downloadtcl-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/tclResult.c')
-rw-r--r--generic/tclResult.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 367ca80..4eb3c69 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclResult.c,v 1.5 2002/01/25 20:40:55 dgp Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.6 2003/05/05 20:54:40 dgp Exp $
*/
#include "tclInt.h"
@@ -1046,7 +1046,12 @@ TclTransferResult(sourceInterp, result, targetInterp)
((Interp *) targetInterp)->flags |= (ERR_IN_PROGRESS | ERROR_CODE_SET);
}
- ((Interp *) targetInterp)->returnCode = ((Interp *) sourceInterp)->returnCode;
+ /* This may need examination for safety */
+ Tcl_DecrRefCount( ((Interp *) targetInterp)->returnOpts );
+ ((Interp *) targetInterp)->returnOpts =
+ ((Interp *) sourceInterp)->returnOpts;
+ Tcl_IncrRefCount( ((Interp *) targetInterp)->returnOpts );
+
Tcl_SetObjResult(targetInterp, Tcl_GetObjResult(sourceInterp));
Tcl_ResetResult(sourceInterp);
}