From b5c698129ce5b48411932613540a8cbf9ea8a85d Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 5 Jul 2016 19:54:04 +0000 Subject: Enable TCL_EVAL_INVOKE support in the Tcl*Eval(Ex)* family. --- generic/tclBasic.c | 7 +++++-- generic/tclEnsemble.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b0c31cc..a57d606 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -4986,6 +4986,7 @@ TclEvalEx( * to the table entry holding the location of * the next invisible continuation line to * look for, while parsing the script. */ + int invoke = flags & TCL_EVAL_INVOKE; if (iPtr->scriptCLLocPtr) { if (clNextOuter) { @@ -5258,7 +5259,7 @@ TclEvalEx( TclArgumentEnter(interp, objv, objectsUsed, eeFramePtr); code = Tcl_EvalObjv(interp, objectsUsed, objv, - TCL_EVAL_NOERR | TCL_EVAL_SOURCE_IN_FRAME); + TCL_EVAL_NOERR | TCL_EVAL_SOURCE_IN_FRAME | invoke); TclArgumentRelease(interp, objv, objectsUsed); eeFramePtr->line = NULL; @@ -5306,6 +5307,7 @@ TclEvalEx( TclAdvanceLines(&line, parsePtr->commandStart, p); Tcl_FreeParse(parsePtr); gotParse = 0; + invoke = 0; } while (bytesLeft > 0); iPtr->varFramePtr = savedVarFramePtr; code = TCL_OK; @@ -5325,7 +5327,8 @@ TclEvalEx( code = TCL_ERROR; } } - if ((code == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { + if ((code == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED) && + !(flags & TCL_EVAL_INVOKE)) { commandLength = parsePtr->commandSize; if (parsePtr->term == parsePtr->commandStart + commandLength - 1) { /* diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 818534e..5243dca 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -1852,7 +1852,7 @@ NsEnsembleImplementationCmdNR( Tcl_ListObjLength(NULL, prefixObj, &prefixObjc); - if (0 && objc == 2) { + if (1 && objc == 2) { /* * Branch disabled until it works. See oo-1[67].1.1 * @@ -1892,7 +1892,7 @@ NsEnsembleImplementationCmdNR( */ TclSkipTailcall(interp); - return TclNREvalObjEx(interp, copyPtr, TCL_EVAL_INVOKE, NULL,INT_MIN); + return TclNREvalObjEx(interp, copyPtr, TCL_EVAL_DIRECT|TCL_EVAL_INVOKE, NULL, INT_MIN); } unknownOrAmbiguousSubcommand: -- cgit v0.12