diff options
author | Kevin B Kenny <kennykb@acm.org> | 2004-09-07 18:21:15 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2004-09-07 18:21:15 (GMT) |
commit | a8f71a729447a54a46df56f612ef6380d2a5a459 (patch) | |
tree | 24591e193d1687ec7038ee33c0ee4fc4e00139e3 /generic/tclTimer.c | |
parent | 8ead0890839dac71e9e564671c34021d61a3bf6e (diff) | |
download | tcl-a8f71a729447a54a46df56f612ef6380d2a5a459.zip tcl-a8f71a729447a54a46df56f612ef6380d2a5a459.tar.gz tcl-a8f71a729447a54a46df56f612ef6380d2a5a459.tar.bz2 |
* generic/tclTimer.c: Removed a premature optimisation that
attempted to store the assoc data in the client data; the
optimisation caused a bug that [after] would overwrite
its imports. [Bug 1016167]
Diffstat (limited to 'generic/tclTimer.c')
-rw-r--r-- | generic/tclTimer.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 25ff9b2..6dd912d 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.6 2002/03/01 06:22:31 hobbs Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.6.2.1 2004/09/07 18:21:16 kennykb Exp $ */ #include "tclInt.h" @@ -732,17 +732,14 @@ TclServiceIdle() /* ARGSUSED */ int Tcl_AfterObjCmd(clientData, interp, objc, objv) - ClientData clientData; /* Points to the "tclAfter" assocData for - * this interpreter, or NULL if the assocData - * hasn't been created yet.*/ + ClientData clientData; /* Unused */ Tcl_Interp *interp; /* Current interpreter. */ int objc; /* Number of arguments. */ Tcl_Obj *CONST objv[]; /* Argument objects. */ { int ms; AfterInfo *afterPtr; - AfterAssocData *assocPtr = (AfterAssocData *) clientData; - Tcl_CmdInfo cmdInfo; + AfterAssocData *assocPtr; int length; char *argString; int index; @@ -765,20 +762,13 @@ Tcl_AfterObjCmd(clientData, interp, objc, objv) * future. */ + assocPtr = Tcl_GetAssocData( interp, "tclAfter", NULL ); if (assocPtr == NULL) { assocPtr = (AfterAssocData *) ckalloc(sizeof(AfterAssocData)); assocPtr->interp = interp; assocPtr->firstAfterPtr = NULL; Tcl_SetAssocData(interp, "tclAfter", AfterCleanupProc, (ClientData) assocPtr); - cmdInfo.proc = NULL; - cmdInfo.clientData = (ClientData) NULL; - cmdInfo.objProc = Tcl_AfterObjCmd; - cmdInfo.objClientData = (ClientData) assocPtr; - cmdInfo.deleteProc = NULL; - cmdInfo.deleteData = (ClientData) assocPtr; - Tcl_SetCommandInfo(interp, Tcl_GetStringFromObj(objv[0], &length), - &cmdInfo); } /* |