summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authormig <mig>2011-08-29 10:43:14 (GMT)
committermig <mig>2011-08-29 10:43:14 (GMT)
commitcb7ed495368dc8bb18338cc748f6e408abf13b1e (patch)
tree9d56f6a13738ae008db0c041d317b7bccbafab00 /generic
parent7fa60e4fb188f417e4b968ef37085cc9c1c171e2 (diff)
downloadtcl-cb7ed495368dc8bb18338cc748f6e408abf13b1e.zip
tcl-cb7ed495368dc8bb18338cc748f6e408abf13b1e.tar.gz
tcl-cb7ed495368dc8bb18338cc748f6e408abf13b1e.tar.bz2
Fix eval's faulty objProc, it was actually an nreProc [3399564|Bug 3399564]. Thanks to Joe Mistachkin for detection and analysis.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c2
-rw-r--r--generic/tclCmdAH.c10
-rw-r--r--generic/tclInt.h3
3 files changed, 13 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index f0f0c0f..9758449 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -215,7 +215,7 @@ static const CmdInfo builtInCmds[] = {
{"continue", Tcl_ContinueObjCmd, TclCompileContinueCmd, NULL, 1},
{"coroutine", NULL, NULL, TclNRCoroutineObjCmd, 1},
{"error", Tcl_ErrorObjCmd, TclCompileErrorCmd, NULL, 1},
- {"eval", Tcl_EvalObjCmd, NULL, NULL, 1},
+ {"eval", Tcl_EvalObjCmd, NULL, TclNREvalObjCmd, 1},
{"expr", Tcl_ExprObjCmd, TclCompileExprCmd, TclNRExprObjCmd, 1},
{"for", Tcl_ForObjCmd, TclCompileForCmd, TclNRForObjCmd, 1},
{"foreach", Tcl_ForeachObjCmd, TclCompileForeachCmd, TclNRForeachCmd, 1},
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 765c9dc..fc9d39d 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -737,6 +737,16 @@ Tcl_EvalObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
+ return Tcl_NRCallObjProc(interp, TclNREvalObjCmd, dummy, objc, objv);
+}
+
+int
+TclNREvalObjCmd(
+ ClientData dummy, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
+{
register Tcl_Obj *objPtr;
Interp *iPtr = (Interp *) interp;
CmdFrame *invoker = NULL;
diff --git a/generic/tclInt.h b/generic/tclInt.h
index d65f712..f30e83e 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -2768,7 +2768,7 @@ MODULE_SCOPE char tclEmptyString;
*/
MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc TclNREvalObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc TclNRCatchObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc TclNRExprObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc TclNRForObjCmd;
@@ -2778,6 +2778,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRSourceObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc TclNRSubstObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc TclNRSwitchObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc TclNRTryObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd;
MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd;
MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback;