summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclBasic.c18
-rw-r--r--tests/parse.test6
2 files changed, 7 insertions, 17 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 8ba3825..7110025 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -6092,21 +6092,13 @@ TclNREvalObjEx(
* Another important action is to save (and later restore) the
* continuation line information of the caller, in case we are
* executing nested commands in the eval/direct path.
- *
- * TODO: Get test coverage in here.
*/
ContLineLoc *saveCLLocPtr = iPtr->scriptCLLocPtr;
- ContLineLoc *clLocPtr = TclContinuationsGet(objPtr);
assert(invoker == NULL);
- if (clLocPtr) {
- iPtr->scriptCLLocPtr = clLocPtr;
- Tcl_Preserve(iPtr->scriptCLLocPtr);
- } else {
- iPtr->scriptCLLocPtr = NULL;
- }
+ iPtr->scriptCLLocPtr = TclContinuationsGet(objPtr);
Tcl_IncrRefCount(objPtr);
@@ -6115,14 +6107,6 @@ TclNREvalObjEx(
TclDecrRefCount(objPtr);
- /*
- * Now release the lock on the continuation line information, if any,
- * and restore the caller's settings.
- */
-
- if (iPtr->scriptCLLocPtr) {
- Tcl_Release(iPtr->scriptCLLocPtr);
- }
iPtr->scriptCLLocPtr = saveCLLocPtr;
return result;
}
diff --git a/tests/parse.test b/tests/parse.test
index 9f2d50b..01443c9 100644
--- a/tests/parse.test
+++ b/tests/parse.test
@@ -1118,6 +1118,12 @@ test parse-21.0 {Bug 1884496} testevent {
testevent queue a head $::script
vwait done
} {}
+test parse-21.1 {TCL_EVAL_DIRECT coverage} testevent {
+ testevent queue a head {testevent delete a; \
+ set ::done [dict get [info frame 0] line]}
+ vwait done
+ set ::done
+} 2
cleanupTests
}