summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-08-07 16:01:53 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-08-07 16:01:53 (GMT)
commitfd31090a583e76ccb81747a37f56e865669aebae (patch)
tree32a70c9488bf171a775c4abcf8cc0acdf506114a
parent9923dc2908c517db587b6cbb398398ab3e45ec16 (diff)
downloadtcl-fd31090a583e76ccb81747a37f56e865669aebae.zip
tcl-fd31090a583e76ccb81747a37f56e865669aebae.tar.gz
tcl-fd31090a583e76ccb81747a37f56e865669aebae.tar.bz2
Test for TclContinuationsGet() usage, and simplifications.
-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
}