summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-09-28 18:02:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-09-28 18:02:19 (GMT)
commit9ed15c4edf59c0dda55797c0debad69464c092c0 (patch)
tree77501ad53b79c0b3566c388189c1a3aa07c74d60 /generic/tclCmdMZ.c
parentbf83bf5f46a2ec5105fac6f5a25b43535dcac49f (diff)
downloadtcl-9ed15c4edf59c0dda55797c0debad69464c092c0.zip
tcl-9ed15c4edf59c0dda55797c0debad69464c092c0.tar.gz
tcl-9ed15c4edf59c0dda55797c0debad69464c092c0.tar.bz2
* generic/tclCmdMZ.c: Replaced TclProcessReturn() calls with
* tests/error.test: Tcl_SetReturnOptions() calls as a simple fix for [Bug 2855247]. Thanks to Anton Kovalenko for the report and fix. Additional fixes for other failures demonstrated by new tests.
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 8824c48..9aed082 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.194 2009/09/24 17:19:18 dgp Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.195 2009/09/28 18:02:20 dgp Exp $
*/
#include "tclInt.h"
@@ -4348,12 +4348,8 @@ TryPostBody(
"\n (\"%s\" body line %d)", TclGetString(cmdObj),
Tcl_GetErrorLine(interp)));
}
- if (handlersObj != NULL || finallyObj != NULL) {
- options = Tcl_GetReturnOptions(interp, result);
- Tcl_IncrRefCount(options);
- } else {
- options = NULL;
- }
+ options = Tcl_GetReturnOptions(interp, result);
+ Tcl_IncrRefCount(options);
Tcl_ResetResult(interp);
/*
@@ -4496,14 +4492,10 @@ TryPostBody(
* any temporary storage.
*/
- if (options != NULL) {
- result = TclProcessReturn(interp, result, 0, options);
- Tcl_DecrRefCount(options);
- }
- if (resultObj != NULL) {
- Tcl_SetObjResult(interp, resultObj);
- Tcl_DecrRefCount(resultObj);
- }
+ result = Tcl_SetReturnOptions(interp, options);
+ Tcl_DecrRefCount(options);
+ Tcl_SetObjResult(interp, resultObj);
+ Tcl_DecrRefCount(resultObj);
return result;
}
@@ -4565,7 +4557,7 @@ TryPostHandler(
* any temporary storage.
*/
- result = TclProcessReturn(interp, result, 0, options);
+ result = Tcl_SetReturnOptions(interp, options);
Tcl_DecrRefCount(options);
Tcl_SetObjResult(interp, resultObj);
Tcl_DecrRefCount(resultObj);
@@ -4623,7 +4615,7 @@ TryPostFinal(
* any temporary storage.
*/
- result = TclProcessReturn(interp, result, 0, options);
+ result = Tcl_SetReturnOptions(interp, options);
Tcl_DecrRefCount(options);
if (resultObj != NULL) {
Tcl_SetObjResult(interp, resultObj);