Tcl Source Code

Artifact [9b1ac2cdc8]
Login

Artifact 9b1ac2cdc88f2dcdf7a046bfd1dfc8e7088c768a:

Attachment "extr.patch" to ticket [571385ffff] added by dgp 2002-06-20 22:51:32.
Index: generic/tclBasic.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
retrieving revision 1.61
diff -u -r1.61 tclBasic.c
--- generic/tclBasic.c	20 Jun 2002 00:11:43 -0000	1.61
+++ generic/tclBasic.c	20 Jun 2002 15:31:26 -0000
@@ -2925,6 +2925,7 @@
     int code = TCL_OK;
     int traceCode = TCL_OK;
     int checkTraces = 1;
+Tcl_Obj *keepMe;
 
     if (objc == 0) {
 	return TCL_OK;
@@ -3000,6 +3002,7 @@
         break;
     }
 
+keepMe = Tcl_DuplicateObj(objv[0]);
     /*
      * Finally, invoke the command's Tcl_ObjCmdProc.
      */
@@ -3029,6 +3034,7 @@
 		       cmdPtr, code, TCL_TRACE_LEAVE_EXEC, objc, objv);
     }
 
+Tcl_DecrRefCount(keepMe);
     /*
      * If one of the trace invocation resulted in error, then 
      * change the result code accordingly. Note, that the