From fcd8250c0cb0e5d3302d0e60110c7f18c070bcb2 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 22 Jan 2008 20:52:07 +0000 Subject: * generic/tclTimer.c (AfterProc): Replace Tcl_EvalEx() with Tcl_EvalObjEx() to evaluate [after] callbacks. Part of trend to favor compiled execution over direct evaluation. --- ChangeLog | 6 ++++++ generic/tclTimer.c | 10 +--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6382207..b289a06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-22 Don Porter + + * generic/tclTimer.c (AfterProc): Replace Tcl_EvalEx() with + Tcl_EvalObjEx() to evaluate [after] callbacks. Part of trend to + favor compiled execution over direct evaluation. + 2008-01-22 Miguel Sofer * generic/tclCmdIl.c (Tcl_LreverseObjCmd): diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 711cb27..6df614e 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.30 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.31 2008/01/22 20:52:10 dgp Exp $ */ #include "tclInt.h" @@ -1121,8 +1121,6 @@ AfterProc( AfterInfo *prevPtr; int result; Tcl_Interp *interp; - char *script; - int numBytes; /* * First remove the callback from our list of callbacks; otherwise someone @@ -1146,13 +1144,7 @@ AfterProc( interp = assocPtr->interp; Tcl_Preserve((ClientData) interp); -#if 0 - /* DKF: Why not just do this? */ result = Tcl_EvalObjEx(interp, afterPtr->commandPtr, TCL_EVAL_GLOBAL); -#else - script = Tcl_GetStringFromObj(afterPtr->commandPtr, &numBytes); - result = Tcl_EvalEx(interp, script, numBytes, TCL_EVAL_GLOBAL); -#endif if (result != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (\"after\" script)"); TclBackgroundException(interp, result); -- cgit v0.12