summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-06-03 22:38:33 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-06-03 22:38:33 (GMT)
commit40f6d3ee82fbc25d07702ff87bdf6449b892a2fa (patch)
treeb00c619355e807a6f2386d82449c4dc319ad8e03 /generic/tclExecute.c
parentcf0124589c255bd43e3b1970e89d7342efaca198 (diff)
parenta097532afd2bcc8ae2869c9d53df714774adfaf6 (diff)
downloadtcl-40f6d3ee82fbc25d07702ff87bdf6449b892a2fa.zip
tcl-40f6d3ee82fbc25d07702ff87bdf6449b892a2fa.tar.gz
tcl-40f6d3ee82fbc25d07702ff87bdf6449b892a2fa.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 567ef76..d90d66e 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -2145,11 +2145,6 @@ TEBCresume(
CACHE_STACK_INFO();
if (result == TCL_OK) {
-#ifndef TCL_COMPILE_DEBUG
- if (*pc == INST_POP) {
- NEXT_INST_V(1, cleanup, 0);
- }
-#endif
/*
* Push the call's object result and continue execution with the
* next instruction.
@@ -2158,8 +2153,6 @@ TEBCresume(
TRACE_WITH_OBJ(("%u => ... after \"%.20s\": TCL_OK, result=",
objc, cmdNameBuf), Tcl_GetObjResult(interp));
- objResultPtr = Tcl_GetObjResult(interp);
-
/*
* Reset the interp's result to avoid possible duplications of
* large objects [Bug 781585]. We do not call Tcl_ResetResult to
@@ -2171,9 +2164,16 @@ TEBCresume(
* the refCount it had in its role of iPtr->objResultPtr.
*/
+ objResultPtr = Tcl_GetObjResult(interp);
TclNewObj(objPtr);
Tcl_IncrRefCount(objPtr);
iPtr->objResultPtr = objPtr;
+#ifndef TCL_COMPILE_DEBUG
+ if (*pc == INST_POP) {
+ TclDecrRefCount(objResultPtr);
+ NEXT_INST_V(1, cleanup, 0);
+ }
+#endif
NEXT_INST_V(0, cleanup, -1);
}