summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-09-22 22:23:36 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-09-22 22:23:36 (GMT)
commit4c8817bf9f61487faa3fd056e823b43f4b800b9d (patch)
tree3a14fa3054e75c417ce931e83b4cb2a8bd73ed74 /generic/tclCmdMZ.c
parentc11c7cb17b6d56aa132b51fcb4b242fe7941d337 (diff)
downloadtcl-4c8817bf9f61487faa3fd056e823b43f4b800b9d.zip
tcl-4c8817bf9f61487faa3fd056e823b43f4b800b9d.tar.gz
tcl-4c8817bf9f61487faa3fd056e823b43f4b800b9d.tar.bz2
* generic/tclCmdMZ.c (TclProcessReturn): Support the -errorline
* generic/tclCompile.c (TclCompileScript): option to [return]. * tests/compile.test (16.23.*): Use that capability to defer reporting * tests/misc.test (1.2): of parse errors until runtime. Updated tests to reflect change. [Bug 1032805]
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 9f41208..93eda56 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.106 2004/09/17 22:59:14 dgp Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.107 2004/09/22 22:23:39 dgp Exp $
*/
#include "tclInt.h"
@@ -921,6 +921,13 @@ TclProcessReturn(interp, code, level, returnOpts)
if (valuePtr != NULL) {
Tcl_SetObjErrorCode(interp, valuePtr);
}
+
+ valuePtr = NULL;
+ Tcl_DictObjGet(NULL, iPtr->returnOpts,
+ iPtr->returnErrorlineKey, &valuePtr);
+ if (valuePtr != NULL) {
+ Tcl_GetIntFromObj(NULL, valuePtr, &iPtr->errorLine);
+ }
}
} else {
code = TCL_RETURN;