summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-09-17 22:59:12 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-09-17 22:59:12 (GMT)
commit943be4691a0b7e656418187abe765d4c43190d17 (patch)
tree5d34faf294f095a400e608bc71536e1ee5249533 /generic/tclCmdMZ.c
parent4ce4e4d5af827805c97d9f0c2a3d2953922f15d0 (diff)
downloadtcl-943be4691a0b7e656418187abe765d4c43190d17.zip
tcl-943be4691a0b7e656418187abe765d4c43190d17.tar.gz
tcl-943be4691a0b7e656418187abe765d4c43190d17.tar.bz2
* generic/tclBasic.c (Tcl_AddObjErrorInfo, Tcl_LogCommandInfo):
* generic/tclCmdAH.c ([catch], [error]): * generic/tclCmdMZ.c ([return]): * generic/tclProc.c (TclUpdateReturnInfo): * generic/tclResult.c (Tcl_SetErrorCodeVA, Tcl_SetObjErrorCode TclTransferResult): Refactored so that all errorCode setting flows through Tcl_SetObjErrorCode(). This greatly reduces the number of different places in the code that need to know details about an internal bitflag field of the Interp struct. Also places errorCode setting in one place for easier future mods.
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 235a9f9..9f41208 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.105 2004/08/30 18:06:33 dkf Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.106 2004/09/17 22:59:14 dgp Exp $
*/
#include "tclInt.h"
@@ -919,9 +919,7 @@ TclProcessReturn(interp, code, level, returnOpts)
Tcl_DictObjGet(NULL, iPtr->returnOpts,
iPtr->returnErrorcodeKey, &valuePtr);
if (valuePtr != NULL) {
- Tcl_SetVar2Ex(interp, "errorCode", NULL,
- valuePtr, TCL_GLOBAL_ONLY);
- iPtr->flags |= ERROR_CODE_SET;
+ Tcl_SetObjErrorCode(interp, valuePtr);
}
}
} else {