diff options
author | dgp <dgp@users.sourceforge.net> | 2013-08-07 16:01:53 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-08-07 16:01:53 (GMT) |
commit | f6f0891fffa23a7577553a42c1f2d16fbcb8170a (patch) | |
tree | 32a70c9488bf171a775c4abcf8cc0acdf506114a | |
parent | 27c5ada57e78e8de829d5e5d7dd0070b9b5a5279 (diff) | |
download | tcl-f6f0891fffa23a7577553a42c1f2d16fbcb8170a.zip tcl-f6f0891fffa23a7577553a42c1f2d16fbcb8170a.tar.gz tcl-f6f0891fffa23a7577553a42c1f2d16fbcb8170a.tar.bz2 |
Test for TclContinuationsGet() usage, and simplifications.
-rw-r--r-- | generic/tclBasic.c | 18 | ||||
-rw-r--r-- | tests/parse.test | 6 |
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 } |