summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-08-07 19:45:13 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-08-07 19:45:13 (GMT)
commit4536322b256c1539a134ea7ecc4a7c32e7b05451 (patch)
tree49dcb3e8f019f76bddd16ef45954dab04191905a
parent77c1bfb88bf69b0a55d43eca6a0029d82458a377 (diff)
downloadtcl-4536322b256c1539a134ea7ecc4a7c32e7b05451.zip
tcl-4536322b256c1539a134ea7ecc4a7c32e7b05451.tar.gz
tcl-4536322b256c1539a134ea7ecc4a7c32e7b05451.tar.bz2
Give (objc, objv) their own ride from enter to leave traces.
-rw-r--r--generic/tclBasic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 7110025..067da63 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -4727,7 +4727,7 @@ TEOV_RunEnterTraces(
*/
TclNRAddCallback(interp, TEOV_RunLeaveTraces, INT2PTR(traceCode),
- commandPtr, cmdPtr, NULL);
+ commandPtr, cmdPtr, Tcl_NewListObj(objc, objv));
cmdPtr->refCount++;
} else {
Tcl_DecrRefCount(commandPtr);
@@ -4748,11 +4748,10 @@ TEOV_RunLeaveTraces(
int traceCode = PTR2INT(data[0]);
Tcl_Obj *commandPtr = data[1];
Command *cmdPtr = data[2];
+ Tcl_Obj *wordsPtr = data[3];
command = Tcl_GetStringFromObj(commandPtr, &length);
- if (TCL_OK != Tcl_ListObjGetElements(interp, commandPtr, &objc, &objv)) {
- Tcl_Panic("Who messed with commandPtr?");
- }
+ Tcl_ListObjGetElements(NULL, wordsPtr, &objc, &objv);
if (!(cmdPtr->flags & CMD_IS_DELETED)) {
if ((cmdPtr->flags & CMD_HAS_EXEC_TRACES) && traceCode == TCL_OK){
@@ -4765,6 +4764,7 @@ TEOV_RunLeaveTraces(
}
}
Tcl_DecrRefCount(commandPtr);
+ Tcl_DecrRefCount(wordsPtr);
/*
* As cmdPtr is set, TclNRRunCallbacks is about to reduce the numlevels.