Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tip-224 Excluding Merge-Ins
This is equivalent to a diff from 2a6c012bff to 325ddbd682
2019-04-14
| ||
14:15 | Implement TIP 160 check-in: 42f24469aa user: dkf tags: core-8-branch | |
2019-04-12
| ||
20:16 | merge 8.7 Closed-Leaf check-in: c8c10b1df8 user: dgp tags: dgp-string-insert | |
20:15 | merge 8.7 Closed-Leaf check-in: a92f73b21e user: dgp tags: tip-367 | |
19:44 | merge 8.7 check-in: 959bd9e05d user: dgp tags: tip-342 | |
19:21 | merge 8.7 check-in: 77b29afa6b user: dgp tags: tip-312-new | |
19:12 | merge 8.7 Closed-Leaf check-in: 325ddbd682 user: dgp tags: tip-224 | |
2019-04-11
| ||
20:38 | Merge 8.7 check-in: c8a7a0b2d8 user: jan.nijtmans tags: trunk | |
20:37 | Merge 8.6 check-in: 2a6c012bff user: jan.nijtmans tags: core-8-branch | |
20:09 | Only use special mp_sqrt() code when double format/tommath format are exactly what's expected. Other... check-in: 3f35b52355 user: jan.nijtmans tags: core-8-6-branch | |
09:52 | merge 8.6 (conflicts resolved, changes on tests/cmdMZ.test in [4cb9044dfa] reverted - timerate is su... check-in: 1803c5e40f user: sebres tags: core-8-branch | |
2019-04-07
| ||
14:45 | Merge 8.7, and fix test-case set-old-8.6 check-in: f511fa47d2 user: jan.nijtmans tags: tip-224 | |
Changes to doc/array.n.
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 21 22 23 24 25 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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + | Unless otherwise specified for individual commands below, \fIarrayName\fR must be the name of an existing array variable. The \fIoption\fR argument determines what action is carried out by the command. The legal \fIoptions\fR (which may be abbreviated) are: .TP \fBarray anymore \fIarrayName searchId\fR . Returns 1 if there are any more elements left to be processed in an array search, 0 if all elements have already been returned. \fISearchId\fR indicates which search on \fIarrayName\fR to check, and must have been the return value from a previous invocation of \fBarray startsearch\fR. This option is particularly useful if an array has an element with an empty name, since the return value from \fBarray nextelement\fR will not indicate whether the search has been completed. .TP \fBarray default \fIsubcommand arrayName args...\fR |
︙ |
Changes to generic/tclEnsemble.c.
︙ | |||
3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 | 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 | + + + + + + + + + + + + + + + + + + + + + + | * that we know will avoid the call to Tcl_WrongNumArgs() at invoke time, * which is the only code that sees the shenanigans of ensemble dispatch. */ if (parsePtr->numWords < 2 || parsePtr->numWords > 4) { return TCL_ERROR; } return CompileBasicNArgCommand(interp, parsePtr, cmdPtr, envPtr); } int TclCompileBasic2To4ArgCmd( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { /* * Verify that the number of arguments is correct; that's the only case * that we know will avoid the call to Tcl_WrongNumArgs() at invoke time, * which is the only code that sees the shenanigans of ensemble dispatch. */ if (parsePtr->numWords < 3 || parsePtr->numWords > 5) { return TCL_ERROR; } return CompileBasicNArgCommand(interp, parsePtr, cmdPtr, envPtr); } int TclCompileBasicMin0ArgCmd( Tcl_Interp *interp, /* Used for error reporting. */ |
︙ |
Changes to generic/tclInt.h.
︙ | |||
3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 | 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 | + + + | Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileBasic0To2ArgCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileBasic1To3ArgCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileBasic2To4ArgCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileBasicMin0ArgCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileBasicMin1ArgCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); |
︙ |
Changes to generic/tclVar.c.
︙ | |||
4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 | 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | } return TCL_OK; } /* *---------------------------------------------------------------------- * * ArrayValueCmd -- * * This object-based function is invoked to process the "array value" Tcl * command. See the user documentation for details on what it does. * * Results: * A standard Tcl result object. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ /* ARGSUSED */ static int ArrayValueCmd( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Var *varPtr, *varPtr2; Tcl_Obj *varNameObj, *elemNameObj, *valueObj, *initObj, *actualValue; int isArray, doInit = 0; switch (objc) { case 3: varNameObj = objv[1]; elemNameObj = objv[2]; valueObj = NULL; initObj = NULL; break; case 4: varNameObj = objv[1]; elemNameObj = objv[2]; valueObj = objv[3]; initObj = NULL; break; case 5: varNameObj = objv[1]; elemNameObj = objv[2]; valueObj = objv[3]; initObj = objv[4]; break; default: Tcl_WrongNumArgs(interp, 1, objv, "arrayName elementName ?value? ?init?"); return TCL_ERROR; } if (TCL_ERROR == LocateArray(interp, varNameObj, &varPtr, &isArray)) { return TCL_ERROR; } if (!isArray) { return NotArrayError(interp, varNameObj); } if (initObj && Tcl_GetBooleanFromObj(interp, initObj, &doInit) != TCL_OK) { return TCL_ERROR; } varPtr2 = VarHashFindVar(varPtr->value.tablePtr, elemNameObj); if (varPtr2 == NULL || TclIsVarUndefined(varPtr2)) { /* * Do we need to initialise the element? If not, non-existence is a * trivial problem. */ if (!doInit) { if (valueObj != NULL) { Tcl_SetObjResult(interp, valueObj); } return TCL_OK; } /* * doInit must be true and that can only happen with enough arguments * that valueObj must have been assigned *something*. * * But it is possible that the array element totally doesn't exist * right now; if so, we need to instantiate it so we can set it. */ if (varPtr2 == NULL) { varPtr2 = TclLookupArrayElement(interp, varNameObj, elemNameObj, TCL_LEAVE_ERR_MSG, "set", 0, 1, varPtr, -1); if (varPtr2 == NULL) { return TCL_ERROR; } } actualValue = TclPtrSetVarIdx(interp, varPtr2, varPtr, varNameObj, elemNameObj, valueObj, TCL_LEAVE_ERR_MSG, -1); } else { actualValue = TclPtrGetVarIdx(interp, varPtr2, varPtr, varNameObj, elemNameObj, TCL_LEAVE_ERR_MSG, -1); } /* * Check for trace trickery. If an error happened, let it flow through. */ if (actualValue == NULL) { return TCL_ERROR; } Tcl_SetObjResult(interp, actualValue); return TCL_OK; } /* *---------------------------------------------------------------------- * * TclInitArrayCmd -- * * This creates the ensemble for the "array" command. * * Results: * The handle for the created ensemble. * |
︙ | |||
4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 | 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 | + | {"names", ArrayNamesCmd, TclCompileBasic1To3ArgCmd, NULL, NULL, 0}, {"nextelement", ArrayNextElementCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0}, {"set", ArraySetCmd, TclCompileArraySetCmd, NULL, NULL, 0}, {"size", ArraySizeCmd, TclCompileBasic1ArgCmd, NULL, NULL, 0}, {"startsearch", ArrayStartSearchCmd, TclCompileBasic1ArgCmd, NULL, NULL, 0}, {"statistics", ArrayStatsCmd, TclCompileBasic1ArgCmd, NULL, NULL, 0}, {"unset", ArrayUnsetCmd, TclCompileArrayUnsetCmd, NULL, NULL, 0}, {"value", ArrayValueCmd, TclCompileBasic2To4ArgCmd, NULL, NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0} }; return TclMakeEnsemble(interp, "array", arrayImplMap); } /* |
︙ |
Changes to tests/set-old.test.
︙ | |||
336 337 338 339 340 341 342 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | - + | } foo } {1 {"x" isn't an array}} test set-old-8.6 {array command} { catch {unset a} set a(22) 3 list [catch {array gorp a} msg] $msg |
︙ |
Changes to tests/var.test.
︙ | |||
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 | 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 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | test var-24.24 {array default unset: errors} -setup { unset -nocomplain ary } -body { array default unset ary x } -returnCodes error -cleanup { unset -nocomplain ary } -result * -match glob test var-25.1 {array value} -setup { unset -nocomplain ary } -body { array value } -returnCodes error -cleanup { unset -nocomplain ary } -result {wrong # args: should be "array value arrayName elementName ?value? ?init?"} test var-25.2 {array value} -setup { unset -nocomplain ary } -body { array value ary } -returnCodes error -cleanup { unset -nocomplain ary } -result {wrong # args: should be "array value arrayName elementName ?value? ?init?"} test var-25.3 {array value} -setup { unset -nocomplain ary } -body { array value ary key a b c } -returnCodes error -cleanup { unset -nocomplain ary } -result {wrong # args: should be "array value arrayName elementName ?value? ?init?"} test var-25.4 {array value} -setup { unset -nocomplain ary } -body { set ary "not an array" array value ary key } -cleanup { unset -nocomplain ary } -returnCodes error -result {"ary" isn't an array} test var-25.5 {array value} -setup { unset -nocomplain ary } -body { array value ary key abc def } -cleanup { unset -nocomplain ary } -returnCodes error -result {"ary" isn't an array} test var-25.6 {array value} -setup { unset -nocomplain ary } -body { array set ary {} array value ary key abc def } -cleanup { unset -nocomplain ary } -returnCodes error -result {expected boolean value but got "def"} test var-25.7 {array value} -setup { unset -nocomplain ary } -body { array set ary {} array value ary key } -cleanup { unset -nocomplain ary } -result {} test var-25.8 {array value} -setup { unset -nocomplain ary } -body { array set ary {} array default set ary xyz array value ary key } -cleanup { unset -nocomplain ary } -result {} test var-25.9 {array value} -setup { unset -nocomplain ary } -body { array set ary {} array value ary key abc } -cleanup { unset -nocomplain ary } -result abc test var-25.10 {array value} -setup { unset -nocomplain ary } -body { array set ary {} array default set ary xyz list [array value ary key abc] $ary(key) } -cleanup { unset -nocomplain ary } -result {abc xyz} test var-25.11 {array value} -setup { unset -nocomplain ary } -body { array set ary {} list [array value ary key abc true] $ary(key) } -cleanup { unset -nocomplain ary } -result {abc abc} test var-25.12 {array value} -setup { unset -nocomplain ary } -body { array set ary {} array default set ary xyz list [array value ary key abc true] $ary(key) } -cleanup { unset -nocomplain ary } -result {abc abc} catch {namespace delete ns} catch {unset arr} catch {unset v} catch {rename getbytes ""} catch {rename p ""} |
︙ |