Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tip-505 Excluding Merge-Ins
This is equivalent to a diff from 019ea86cdd to 61f5b23d57
2018-09-27
| ||
08:19 | Implementation of TIP 505: Make [lreplace] Accept All Out-of-Range Index Values check-in: 125e27afcc user: dkf tags: core-8-6-branch | |
07:44 | Updated documentation Closed-Leaf check-in: 61f5b23d57 user: dkf tags: tip-505 | |
2018-09-20
| ||
13:41 | merge bug-46b6edad51-concurrent-http check-in: 0d794ec27b user: kjnash tags: core-8-6-branch | |
2018-09-15
| ||
18:41 | merge 8.6 Closed-Leaf check-in: 82cbd9d626 user: kjnash tags: bug-46b6edad51-concurrent-http | |
2018-09-10
| ||
15:28 | Rebase TIP 505 implementation a patch for 8.6. check-in: 998387f679 user: dgp tags: tip-505 | |
2018-09-07
| ||
22:23 | Merge 8.6 check-in: 4ccc3b6902 user: jan.nijtmans tags: core-8-branch | |
14:24 | small code review (duplicate code removed) check-in: 019ea86cdd user: sebres tags: core-8-6-branch | |
12:04 | Added test for [631b4c45df]. check-in: 036c01e552 user: dgp tags: core-8-6-branch | |
Changes to doc/lreplace.n.
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - - + + + + + + + + + + + + + + + | supporting simple index arithmetic and indices relative to the end of the list. 0 refers to the first element of the list, and \fBend\fR refers to the last element of the list. If \fIlist\fR is empty, then \fIfirst\fR and \fIlast\fR are ignored. .PP If \fIfirst\fR is less than zero, it is considered to refer to before the |
︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | + + + + + + + + + + + + + + + + + | .CS proc lremove {listVariable value} { upvar 1 $listVariable var set idx [lsearch -exact $var $value] set var [\fBlreplace\fR $var $idx $idx] } .CE .PP .VS TIP505 Adding elements to the end of the list; note that \fBend+2\fR will initially be treated as if it is \fB6\fR here, but both that and \fB12345\fR are greater than the index of the final item so they behave identically: .PP .CS % set var {a b c d e} a b c d e % set var [\fBlreplace\fR $var 12345 end+2 f g h i] a b c d e f g h i .CE .VE TIP505 .SH "SEE ALSO" list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lset(n), lrange(n), lsort(n), string(n) .SH KEYWORDS element, list, replace .\" Local variables: .\" mode: nroff .\" fill-column: 78 .\" End: |
Changes to generic/tclCmdIL.c.
︙ | |||
2743 2744 2745 2746 2747 2748 2749 | 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 | - + - - - - + - - - + - - - - - - - + | if (result != TCL_OK) { return result; } if (first < 0) { first = 0; } |
︙ |
Changes to generic/tclCompCmdsGR.c.
︙ | |||
1468 1469 1470 1471 1472 1473 1474 | 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 | - + - - - - - - - - - - - - - - - - - + + - + | * command. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds the resulting instructions. */ { Tcl_Token *tokenPtr, *listTokenPtr; DefineLineInformation; /* TIP #280 */ |
︙ | |||
1548 1549 1550 1551 1552 1553 1554 | 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | /* Make a list of them... */ TclEmitInstInt4( INST_LIST, i - 4, envPtr); emptyPrefix = 0; } |
︙ |
Changes to tests/lreplace.test.
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | - + - + | set foo {a b} list [set foo [lreplace $foo end end]] \ [set foo [lreplace $foo end end]] \ [set foo [lreplace $foo end end]] } {a {} {}} test lreplace-1.27 {lreplace command} -body { lreplace x 1 1 |
︙ | |||
124 125 126 127 128 129 130 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + - + | list [catch {lreplace x 10 x} msg] $msg } {1 {bad index "x": must be integer?[+-]integer? or end?[+-]integer?}} test lreplace-2.5 {lreplace errors} { list [catch {lreplace x 10 1x} msg] $msg } {1 {bad index "1x": must be integer?[+-]integer? or end?[+-]integer?}} test lreplace-2.6 {lreplace errors} { list [catch {lreplace x 3 2} msg] $msg |
︙ |