diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | generic/tclTimer.c | 18 |
2 files changed, 11 insertions, 14 deletions
@@ -1,3 +1,10 @@ +2004-09-07 Kevin B. Kenny <kennykb@acm.org> + + * 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] + 2004-09-02 Donal K. Fellows <donal.k.fellows@man.ac.uk> * doc/lsearch.n: Clarified meaning of -dictionary. [Bug 759545] 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); } /* |