Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch internal-ensemble-cleanup Excluding Merge-Ins
This is equivalent to a diff from b6800b76c8 to ad795c4db6
|
2025-11-11
| ||
| 20:26 | Refactor core ensemble creation/management so that the tables describing what's there and what's saf... check-in: a165eede1d user: dkf tags: trunk, main | |
| 09:29 | Merge 9.0 check-in: 2f1c224732 user: jan.nijtmans tags: trunk, main | |
|
2025-11-10
| ||
| 17:03 | merge trunk Closed-Leaf check-in: ad795c4db6 user: dkf tags: internal-ensemble-cleanup | |
| 17:00 | merge trunk Closed-Leaf check-in: 2491dad7a7 user: dkf tags: c11-tebc-trace-cleanup | |
| 15:09 | merge trunk check-in: 7ffebdfab0 user: dkf tags: enums-3 | |
| 14:02 | Name three related enums in a consistent way check-in: b6800b76c8 user: dkf tags: trunk, main | |
|
2025-11-09
| ||
| 11:16 | merge trunk check-in: fcad76bb7d user: dkf tags: internal-ensemble-cleanup | |
| 09:57 | Merge 9.0. Bug [cb03e57a] - raise error on empty regexp for unresolved variable. check-in: 2ab1a13679 user: apnadkarni tags: trunk, main | |
Changes to generic/tclBasic.c.
| ︙ | |||
163 164 165 166 167 168 169 170 171 172 173 174 175 176 | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | + |
iPtr->lineLABCPtr = (context).lineLABCPtr
/*
* Static functions in this file:
*/
static Tcl_ObjCmdProc BadEnsembleSubcommand;
static Tcl_CmdDeleteProc BadEnsembleSubcommandCleanup;
static char * CallCommandTraces(Interp *iPtr, Command *cmdPtr,
const char *oldName, const char *newName,
int flags);
static int CancelEvalProc(void *clientData,
Tcl_Interp *interp, int code);
static int CheckDoubleResult(Tcl_Interp *interp, double dResult);
static void DeleteCoroutine(void *clientData);
|
| ︙ | |||
254 255 256 257 258 259 260 | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | - - - - - + + + + + - - - - - + + + + + + + + + + + + + - - + + - - - - - - - + + + + + + + |
};
/*
* The following structure define the commands in the Tcl core.
*/
typedef struct {
|
| ︙ | |||
404 405 406 407 408 409 410 | 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | - - - + + + - - + - - - - + + - - - - - + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + - - - - - + - - - + - - - - - - - - - - - - - - + + |
{"timerate", Tcl_TimeRateObjCmd, NULL, NULL, CMD_IS_SAFE},
{"unload", Tcl_UnloadObjCmd, NULL, NULL, 0},
{"update", Tcl_UpdateObjCmd, NULL, NULL, CMD_IS_SAFE},
{"vwait", Tcl_VwaitObjCmd, NULL, NULL, CMD_IS_SAFE},
{NULL, NULL, NULL, NULL, 0}
};
|
| ︙ | |||
1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 | 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 | + + + + + + + |
iPtr->allocCache = (AllocCache *)TclpGetAllocCache();
#else
iPtr->allocCache = NULL;
#endif
iPtr->pendingObjDataPtr = NULL;
iPtr->asyncReadyPtr = TclGetAsyncReadyPtr();
iPtr->deferredCallbacks = NULL;
// Create the namespace for unsupported bits and pieces.
Tcl_Namespace *unsupportedNs = Tcl_CreateNamespace(interp,
"::tcl::unsupported", NULL, NULL);
if (unsupportedNs == NULL) {
Tcl_Panic("couldn't find ::tcl::unsupported");
}
/*
* Create the core commands. Do it here, rather than calling Tcl_CreateObjCommand,
* because it's faster (there's no need to check for a preexisting command
* by the same name). Set the Tcl_CmdProc to NULL.
*/
|
| ︙ | |||
1144 1145 1146 1147 1148 1149 1150 | 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 | - - - - + + + + - - - - - + + + + + - - - - + + + - - - + + + |
cmdPtr->tracePtr = NULL;
cmdPtr->nreProc = cmdInfoPtr->nreProc;
Tcl_SetHashValue(hPtr, cmdPtr);
}
}
/*
|
| ︙ | |||
1187 1188 1189 1190 1191 1192 1193 | 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | - + - - - - - - + - - - - + + + - - + - - - - + - - - - + - - - - + - - + |
Tcl_CreateObjCommand(interp, "::tcl::Bgerror",
TclDefaultBgErrorHandlerObjCmd, NULL, NULL);
/*
* Create unsupported commands for debugging bytecode and objects.
*/
|
| ︙ | |||
1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 | 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - + + + + + - - + - - - + + - - - + + - - - + + - - - - - + + + + - - - - + - + + - + - - - - - - + + + + + |
* TCL_OK if it succeeds, TCL_ERROR else.
*
* Side effects:
* Hides functionality in an interpreter.
*
*----------------------------------------------------------------------
*/
static void
HideCommandInTclNs(
Tcl_Interp *interp,
const char *nsName,
const char *name,
Tcl_Obj *publicNameTuple)
{
Tcl_Obj *cmdName = Tcl_ObjPrintf("::tcl::%s::%s", nsName, name);
Tcl_Obj *hideName = Tcl_ObjPrintf("tcl:%s:%s", nsName, name);
#define INTERIM_HACK_NAME "___tmp"
// TODO: Fix the hiding machinery to handle namespaced commands.
if (TclRenameCommand(interp, TclGetString(cmdName),
INTERIM_HACK_NAME) != TCL_OK
|| Tcl_HideCommand(interp, INTERIM_HACK_NAME,
TclGetString(hideName)) != TCL_OK) {
Tcl_Panic("problem making '%s %s' safe: %s",
nsName, name, Tcl_GetStringResult(interp));
}
if (publicNameTuple) {
Tcl_IncrRefCount(publicNameTuple);
Tcl_CreateObjCommand(interp, TclGetString(cmdName),
BadEnsembleSubcommand, (void *)publicNameTuple,
BadEnsembleSubcommandCleanup);
}
TclDecrRefCount(cmdName);
TclDecrRefCount(hideName);
}
int
TclHideUnsafeCommands(
Tcl_Interp *interp) /* Hide commands in this interpreter. */
{
const CmdInfo *cmdInfoPtr;
const EnsembleSetup *ensSetupPtr;
|
| ︙ | |||
1518 1519 1520 1521 1522 1523 1524 | 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 | - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + |
static int
BadEnsembleSubcommand(
void *clientData,
Tcl_Interp *interp,
TCL_UNUSED(int) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /* objv */)
{
|
| ︙ |
Changes to generic/tclBinary.c.
| ︙ | |||
116 117 118 119 120 121 122 | 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 | - + - + - + - + |
'='
};
/*
* How to construct the ensembles.
*/
|
| ︙ | |||
780 781 782 783 784 785 786 | 780 781 782 783 784 785 786 787 788 789 790 791 792 793 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
if (bytes) {
memcpy(byteArrayPtr->bytes + byteArrayPtr->used, bytes, len);
}
byteArrayPtr->used += len;
TclInvalidateStringRep(objPtr);
}
|
| ︙ |
Changes to generic/tclClock.c.
| ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + + + |
#include "tclTomMath.h"
#include "tclStrIdxTree.h"
#include "tclDate.h"
#if defined(_WIN32) && defined (__clang__) && (__clang_major__ > 20)
#pragma clang diagnostic ignored "-Wc++-keyword"
#endif
/* The namespace containing the [clock] internals. */
#define TCL_CLOCK_NS "::tcl::clock"
/*
* Table of the days in each month, leap and common years
*/
static const int hath[2][12] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
|
| ︙ | |||
110 111 112 113 114 115 116 117 118 119 | 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 | + - - - + + + + + + + - + - - - + + - - - + - - - + + - + - - - + + + + + + + + + + + + + + + + + + + + + | static Tcl_ObjCmdProc ClockAddObjCmd; static int ClockValidDate(DateInfo *, ClockFmtScnCmdArgs *, int stage); static struct tm * ThreadSafeLocalTime(const time_t *); static size_t TzsetIfNecessary(void); static void ClockDeleteCmdProc(void *); static void ClockFinalize(void *); /* * Structure containing description of "native" clock commands to create. */ |
| ︙ | |||
167 168 169 170 171 172 173 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | - - - - - - - + - |
*----------------------------------------------------------------------
*/
void
TclClockInit(
Tcl_Interp *interp) /* Tcl interpreter */
{
|
| ︙ | |||
197 198 199 200 201 202 203 | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | - + + |
return;
}
/*
* Create the client data, which is a refcounted literal pool.
*/
|
| ︙ | |||
249 250 251 252 253 254 255 | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | - - + + - - + + - - - - - - + + + + - - - + - |
data->defFlags = CLF_VALIDATE;
/*
* Install the commands.
*/
|
| ︙ | |||
955 956 957 958 959 960 961 | 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 | - - - - + + + + - + |
void *clientData, /* Client data containing literal pool */
Tcl_Interp *interp, /* Tcl interpreter */
int objc, /* Parameter count */
Tcl_Obj *const objv[]) /* Parameter vector */
{
ClockClientData *dataPtr = (ClockClientData *)clientData;
static const char *const options[] = {
|
| ︙ | |||
1136 1137 1138 1139 1140 1141 1142 | 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | - - - - - - - - - - - - - - - - - - - - | Tcl_SetObjResult(interp, Tcl_NewBooleanObj(dataPtr->defFlags & CLF_VALIDATE)); } break; case CLOCK_CLEAR_CACHE: ClockConfigureClear(dataPtr); break; |
| ︙ | |||
1414 1415 1416 1417 1418 1419 1420 | 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 | - |
{
ClockClientData *dataPtr = (ClockClientData *)clientData;
Tcl_Obj *secondsObj;
Tcl_Obj *dict;
int changeover;
TclDateFields fields;
int created = 0;
|
| ︙ | |||
1451 1452 1453 1454 1455 1456 1457 | 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 | - + - + - + |
*/
if (Tcl_IsShared(dict)) {
dict = Tcl_DuplicateObj(dict);
created = 1;
Tcl_IncrRefCount(dict);
}
|
| ︙ | |||
1698 1699 1700 1701 1702 1703 1704 | 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 | - |
{
TclDateFields fields;
Tcl_Obj *dict;
ClockClientData *data = (ClockClientData *)clientData;
Tcl_Obj *const *lit = data->literals;
int changeover;
int copied = 0;
|
| ︙ | |||
1739 1740 1741 1742 1743 1744 1745 | 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 | - + - + - + |
*/
if (Tcl_IsShared(dict)) {
dict = Tcl_DuplicateObj(dict);
Tcl_IncrRefCount(dict);
copied = 1;
}
|
| ︙ | |||
1784 1785 1786 1787 1788 1789 1790 | 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 | - |
{
TclDateFields fields;
Tcl_Obj *dict;
ClockClientData *data = (ClockClientData *)clientData;
Tcl_Obj *const *lit = data->literals;
int changeover;
int copied = 0;
|
| ︙ | |||
1825 1826 1827 1828 1829 1830 1831 | 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 | - + - + - + |
*/
if (Tcl_IsShared(dict)) {
dict = Tcl_DuplicateObj(dict);
Tcl_IncrRefCount(dict);
copied = 1;
}
|
| ︙ |
Changes to generic/tclCmdAH.c.
| ︙ | |||
95 96 97 98 99 100 101 102 103 104 105 106 107 108 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
static Tcl_ObjCmdProc PathJoinCmd;
static Tcl_ObjCmdProc PathNativeNameCmd;
static Tcl_ObjCmdProc PathNormalizeCmd;
static Tcl_ObjCmdProc PathRootNameCmd;
static Tcl_ObjCmdProc PathSplitCmd;
static Tcl_ObjCmdProc PathTailCmd;
static Tcl_ObjCmdProc PathTypeCmd;
const EnsembleImplMap tclEncodingImplMap[] = {
{"convertfrom", EncodingConvertfromObjCmd, TclCompileBasic1To3ArgCmd, NULL, NULL, 0},
{"convertto", EncodingConverttoObjCmd, TclCompileBasic1To3ArgCmd, NULL, NULL, 0},
{"dirs", EncodingDirsObjCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 1},
{"names", EncodingNamesObjCmd, TclCompileBasic0ArgCmd, NULL, NULL, 0},
{"profiles", EncodingProfilesObjCmd, TclCompileBasic0ArgCmd, NULL, NULL, 0},
{"system", EncodingSystemObjCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 1},
{"user", EncodingUserObjCmd, TclCompileBasic0ArgCmd, NULL, NULL, 0},
{NULL, NULL, NULL, NULL, NULL, 0}
};
const EnsembleImplMap tclFileImplMap[] = {
{"atime", FileAttrAccessTimeCmd, TclCompileBasic1Or2ArgCmd, NULL, NULL, 1},
{"attributes", TclFileAttrsCmd, NULL, NULL, NULL, 1},
{"channels", TclChannelNamesCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 0},
{"copy", TclFileCopyCmd, NULL, NULL, NULL, 1},
{"delete", TclFileDeleteCmd, TclCompileBasicMin0ArgCmd, NULL, NULL, 1},
{"dirname", PathDirNameCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"executable", FileAttrIsExecutableCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"exists", FileAttrIsExistingCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"extension", PathExtensionCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"home", TclFileHomeCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 1},
{"isdirectory", FileAttrIsDirectoryCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"isfile", FileAttrIsFileCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"join", PathJoinCmd, TclCompileBasicMin1ArgCmd, NULL, NULL, 0},
{"link", TclFileLinkCmd, TclCompileBasic1To3ArgCmd, NULL, NULL, 1},
{"lstat", FileAttrLinkStatCmd, TclCompileBasic2ArgCmd, NULL, NULL, 1},
{"mtime", FileAttrModifyTimeCmd, TclCompileBasic1Or2ArgCmd, NULL, NULL, 1},
{"mkdir", TclFileMakeDirsCmd, TclCompileBasicMin0ArgCmd, NULL, NULL, 1},
{"nativename", PathNativeNameCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"normalize", PathNormalizeCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"owned", FileAttrIsOwnedCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"pathtype", PathTypeCmd, TclCompileBasic1ArgCmd, NULL, NULL, 0},
{"readable", FileAttrIsReadableCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"readlink", TclFileReadLinkCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"rename", TclFileRenameCmd, NULL, NULL, NULL, 1},
{"rootname", PathRootNameCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"separator", FilesystemSeparatorCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 0},
{"size", FileAttrSizeCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"split", PathSplitCmd, TclCompileBasic1ArgCmd, NULL, NULL, 0},
{"stat", FileAttrStatCmd, TclCompileBasic2ArgCmd, NULL, NULL, 1},
{"system", PathFilesystemCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 0},
{"tail", PathTailCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"tempdir", TclFileTempDirCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 1},
{"tempfile", TclFileTemporaryCmd, TclCompileBasic0To2ArgCmd, NULL, NULL, 1},
{"tildeexpand", TclFileTildeExpandCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"type", FileAttrTypeCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{"volumes", FilesystemVolumesCmd, TclCompileBasic0ArgCmd, NULL, NULL, 1},
{"writable", FileAttrIsWritableCmd, TclCompileBasic1ArgCmd, NULL, NULL, 1},
{NULL, NULL, NULL, NULL, NULL, 0}
};
/*
*----------------------------------------------------------------------
*
* Tcl_BreakObjCmd --
*
* This procedure is invoked to process the "break" Tcl command. See the
|
| ︙ | |||
363 364 365 366 367 368 369 | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
}
return TCL_CONTINUE;
}
|
| ︙ | |||
1112 1113 1114 1115 1116 1117 1118 | 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
if (result == TCL_OK) {
Tcl_SetObjResult(interp, resultPtr);
}
Tcl_DecrRefCount(resultPtr);
return result;
}
|
| ︙ |
Changes to generic/tclCmdIL.c.
| ︙ | |||
145 146 147 148 149 150 151 | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | - + | SortInfo *infoPtr); /* * Array of values describing how to implement each standard subcommand of the * "info" command. */ |
| ︙ | |||
416 417 418 419 420 421 422 | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | - - - - - - - - - - - - - - - - - - - - - - - - |
* Set the interpreter's object result to refer to the variable's new
* value object.
*/
Tcl_SetObjResult(interp, newValuePtr);
return TCL_OK;
}
|
| ︙ |
Changes to generic/tclCmdMZ.c.
| ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
static Tcl_NRPostProc TryPostFinal;
static Tcl_NRPostProc TryPostHandler;
static int UniCharIsAscii(int character);
static int UniCharIsHexDigit(int character);
static int StringCmpOpts(Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[], int *nocase,
Tcl_Size *reqlength);
static Tcl_ObjCmdProc StringCatCmd;
static Tcl_ObjCmdProc StringCmpCmd;
static Tcl_ObjCmdProc StringEqualCmd;
static Tcl_ObjCmdProc StringFirstCmd;
static Tcl_ObjCmdProc StringIndexCmd;
static Tcl_ObjCmdProc StringInsertCmd;
static Tcl_ObjCmdProc StringIsCmd;
static Tcl_ObjCmdProc StringLastCmd;
static Tcl_ObjCmdProc StringLenCmd;
static Tcl_ObjCmdProc StringMapCmd;
static Tcl_ObjCmdProc StringMatchCmd;
static Tcl_ObjCmdProc StringRangeCmd;
static Tcl_ObjCmdProc StringReptCmd;
static Tcl_ObjCmdProc StringRplcCmd;
static Tcl_ObjCmdProc StringRevCmd;
static Tcl_ObjCmdProc StringLowerCmd;
static Tcl_ObjCmdProc StringUpperCmd;
static Tcl_ObjCmdProc StringTitleCmd;
static Tcl_ObjCmdProc StringTrimCmd;
static Tcl_ObjCmdProc StringTrimLCmd;
static Tcl_ObjCmdProc StringTrimRCmd;
static Tcl_ObjCmdProc StringEndCmd;
static Tcl_ObjCmdProc StringStartCmd;
static Tcl_ObjCmdProc TclUnicodeNormalizeCmd;
/*
* Definition of the contents of the [string] ensemble.
*/
const EnsembleImplMap tclStringImplMap[] = {
{"cat", StringCatCmd, TclCompileStringCatCmd, NULL, NULL, 0},
{"compare", StringCmpCmd, TclCompileStringCmpCmd, NULL, NULL, 0},
{"equal", StringEqualCmd, TclCompileStringEqualCmd, NULL, NULL, 0},
{"first", StringFirstCmd, TclCompileStringFirstCmd, NULL, NULL, 0},
{"index", StringIndexCmd, TclCompileStringIndexCmd, NULL, NULL, 0},
{"insert", StringInsertCmd, TclCompileStringInsertCmd, NULL, NULL, 0},
{"is", StringIsCmd, TclCompileStringIsCmd, NULL, NULL, 0},
{"last", StringLastCmd, TclCompileStringLastCmd, NULL, NULL, 0},
{"length", StringLenCmd, TclCompileStringLenCmd, NULL, NULL, 0},
{"map", StringMapCmd, TclCompileStringMapCmd, NULL, NULL, 0},
{"match", StringMatchCmd, TclCompileStringMatchCmd, NULL, NULL, 0},
{"range", StringRangeCmd, TclCompileStringRangeCmd, NULL, NULL, 0},
{"repeat", StringReptCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
{"replace", StringRplcCmd, TclCompileStringReplaceCmd, NULL, NULL, 0},
{"reverse", StringRevCmd, TclCompileBasic1ArgCmd, NULL, NULL, 0},
{"tolower", StringLowerCmd, TclCompileStringToLowerCmd, NULL, NULL, 0},
{"toupper", StringUpperCmd, TclCompileStringToUpperCmd, NULL, NULL, 0},
{"totitle", StringTitleCmd, TclCompileStringToTitleCmd, NULL, NULL, 0},
{"trim", StringTrimCmd, TclCompileStringTrimCmd, NULL, NULL, 0},
{"trimleft", StringTrimLCmd, TclCompileStringTrimLCmd, NULL, NULL, 0},
{"trimright", StringTrimRCmd, TclCompileStringTrimRCmd, NULL, NULL, 0},
{"wordend", StringEndCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
{"wordstart", StringStartCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
{NULL, NULL, NULL, NULL, NULL, 0}
};
/*
* Definition of the contents of the [unicode] ensemble.
*/
const EnsembleImplMap tclUnicodeImplMap[] = {
{"tonfc", TclUnicodeNormalizeCmd, NULL, NULL, (void *)TCL_NFC, 0},
{"tonfd", TclUnicodeNormalizeCmd, NULL, NULL, (void *)TCL_NFD, 0},
{"tonfkc", TclUnicodeNormalizeCmd, NULL, NULL, (void *)TCL_NFKC, 0},
{"tonfkd", TclUnicodeNormalizeCmd, NULL, NULL, (void *)TCL_NFKD, 0},
{NULL, NULL, NULL, NULL, NULL, 0}
};
/*
* Default set of characters to trim in [string trim] and friends. This is a
* UTF-8 literal string containing all Unicode space characters [TIP #413]
*/
const char tclDefaultTrimSet[] =
|
| ︙ | |||
3262 3263 3264 3265 3266 3267 3268 | 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
Tcl_SetObjResult(interp, Tcl_NewStringObj(string1, length1-trim));
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
|
| ︙ | |||
5475 5476 5477 5478 5479 5480 5481 | 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 | - - - - - - - - - - - - - - - - - - - - - - - - - - - |
&ds) != TCL_OK) {
return TCL_ERROR;
}
Tcl_DStringResult(interp, &ds);
return TCL_OK;
}
|
Changes to generic/tclCompCmds.c.
| ︙ | |||
3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 | 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 | + |
CompileEnv *envPtr) /* Holds resulting instructions. */
{
DefineLineInformation; /* TIP #280 */
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
Tcl_Obj **objv, *formatObj, *tmpObj;
const char *bytes, *start;
Tcl_Size i, j, numWords = parsePtr->numWords;
/* TODO: Consider support for runtime formats. */
/* TODO: Consider support for compiling expanded args. */
/*
* Don't handle any guaranteed-error cases.
*/
if (numWords < 2 || numWords > UINT_MAX) {
|
| ︙ |
Changes to generic/tclDictObj.c.
| ︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + | static Tcl_NRPostProc DictForLoopCallback; static Tcl_NRPostProc DictMapLoopCallback; /* * Table of dict subcommand names and implementations. */ |
| ︙ | |||
3962 3963 3964 3965 3966 3967 3968 | 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 | - - - - - - - - - - - - - - - - - - - - - - - - - |
TclDecrRefCount(dictPtr);
}
return TCL_ERROR;
}
return TCL_OK;
}
|
Changes to generic/tclIOCmd.c.
| ︙ | |||
41 42 43 44 45 46 47 | 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 | - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | */ #define ASSOC_KEY "tclTCPAcceptCallbacks" /* * Static functions for this file: */ |
| ︙ | |||
2078 2079 2080 2081 2082 2083 2084 | 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 | - + - + - + - + - - - + + + + - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - |
return Tcl_GetChannelNamesEx(interp,
((objc == 1) ? NULL : TclGetString(objv[1])));
}
/*
*----------------------------------------------------------------------
*
|
Changes to generic/tclIndexObj.c.
| ︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + + + + + + |
static void FreeIndex(Tcl_Obj *objPtr);
static Tcl_ObjCmdProc PrefixAllObjCmd;
static Tcl_ObjCmdProc PrefixLongestObjCmd;
static Tcl_ObjCmdProc PrefixMatchObjCmd;
static void PrintUsage(Tcl_Interp *interp,
const Tcl_ArgvInfo *argTable);
const EnsembleImplMap tclPrefixImplMap[] = {
{"all", PrefixAllObjCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
{"longest", PrefixLongestObjCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
{"match", PrefixMatchObjCmd, TclCompileBasicMin2ArgCmd, NULL, NULL, 0},
{NULL, NULL, NULL, NULL, NULL, 0}
};
/*
* The structure below defines the index Tcl object type by means of functions
* that can be invoked by generic object code.
*/
const Tcl_ObjType tclIndexType = {
"index", /* name */
|
| ︙ | |||
454 455 456 457 458 459 460 | 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | - + - + - + - - - + + + - - - - - - - - - + + - - + - |
Tcl_Free(TclFetchInternalRep(objPtr, &tclIndexType)->twoPtrValue.ptr1);
objPtr->typePtr = NULL;
}
/*
*----------------------------------------------------------------------
*
|
| ︙ |
Changes to generic/tclInt.h.
| ︙ | |||
1764 1765 1766 1767 1768 1769 1770 | 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 | - + | /* * Structure used in implementation of those core ensembles which are * partially compiled. Used as an array of these, with a terminating field * whose 'name' is NULL. */ |
| ︙ | |||
3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 | 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 | + + + + + + + + + + + + + + + + + + + + + + |
*/
MODULE_SCOPE const Tcl_HashKeyType tclArrayHashKeyType;
MODULE_SCOPE const Tcl_HashKeyType tclOneWordHashKeyType;
MODULE_SCOPE const Tcl_HashKeyType tclStringHashKeyType;
MODULE_SCOPE const Tcl_HashKeyType tclObjHashKeyType;
/*
* Tables ("implementation maps") used to declare ensembles.
*/
MODULE_SCOPE const EnsembleImplMap tclArrayImplMap[];
MODULE_SCOPE const EnsembleImplMap tclBinaryImplMap[];
MODULE_SCOPE const EnsembleImplMap tclBinaryEncodeImplMap[];
MODULE_SCOPE const EnsembleImplMap tclBinaryDecodeImplMap[];
MODULE_SCOPE const EnsembleImplMap tclChanImplMap[];
MODULE_SCOPE const EnsembleImplMap tclClockImplMap[];
MODULE_SCOPE const EnsembleImplMap tclDictImplMap[];
MODULE_SCOPE const EnsembleImplMap tclEncodingImplMap[];
MODULE_SCOPE const EnsembleImplMap tclFileImplMap[];
MODULE_SCOPE const EnsembleImplMap tclInfoImplMap[];
MODULE_SCOPE const EnsembleImplMap tclNamespaceImplMap[];
MODULE_SCOPE const EnsembleImplMap tclPrefixImplMap[];
MODULE_SCOPE const EnsembleImplMap tclProcessImplMap[];
MODULE_SCOPE const EnsembleImplMap tclStringImplMap[];
MODULE_SCOPE const EnsembleImplMap tclUnicodeImplMap[];
MODULE_SCOPE const EnsembleImplMap tclZipfsImplMap[];
MODULE_SCOPE const EnsembleImplMap tclZlibImplMap[];
/*
* The head of the list of free Tcl objects, and the total number of Tcl
* objects ever allocated and freed.
*/
MODULE_SCOPE Tcl_Obj * tclFreeObjList;
|
| ︙ | |||
3728 3729 3730 3731 3732 3733 3734 | 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 | - - - + + - | * Command procedures in the generic core: *---------------------------------------------------------------- */ MODULE_SCOPE Tcl_ObjCmdProc Tcl_AfterObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_AppendObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_ApplyObjCmd; |
| ︙ | |||
3771 3772 3773 3774 3775 3776 3777 | 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 | - - | MODULE_SCOPE Tcl_ObjCmdProc Tcl_EvalObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_ExecObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_ExitObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_ExprObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_FblockedObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_FconfigureObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_FcopyObjCmd; |
| ︙ | |||
3804 3805 3806 3807 3808 3809 3810 | 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 | - - + + - - | MODULE_SCOPE Tcl_ObjCmdProc Tcl_LrepeatObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_LreplaceObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_LreverseObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_LsearchObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_LseqObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_LsetObjCmd; MODULE_SCOPE Tcl_ObjCmdProc Tcl_LsortObjCmd; |
| ︙ | |||
4136 4137 4138 4139 4140 4141 4142 | 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 | - + + |
TCL_PROCESS_EXITED = 1, /* Process has exited. */
TCL_PROCESS_SIGNALED = 2, /* Child killed because of a signal. */
TCL_PROCESS_STOPPED = 3, /* Child suspended because of a signal. */
TCL_PROCESS_UNKNOWN_STATUS = 4
/* Child wait status didn't make sense. */
} TclProcessWaitStatus;
|
| ︙ |
Changes to generic/tclInterp.c.
| ︙ | |||
442 443 444 445 446 447 448 | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | + - + + |
" }\n"
" set dirs {}\n"
" set errors {}\n"
" foreach script $scripts {\n"
" if {[set tcl_library [eval $script]] eq \"\"} continue\n"
" set tclfile [file join $tcl_library init.tcl]\n"
" if {[file exists $tclfile]} {\n"
" try {\n"
|
| ︙ |
Changes to generic/tclNamesp.c.
| ︙ | |||
152 153 154 155 156 157 158 | 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 | - + - + - + |
} while (false)
/*
* Array of values describing how to implement each standard subcommand of the
* "namespace" command.
*/
|
| ︙ | |||
2537 2538 2539 2540 2541 2542 2543 | 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 | - + |
Tcl_Namespace *
TclEnsureNamespace(
Tcl_Interp *interp,
Tcl_Namespace *namespacePtr)
{
Namespace *nsPtr = (Namespace *) namespacePtr;
if (!(nsPtr->flags & NS_DYING)) {
|
| ︙ | |||
3075 3076 3077 3078 3079 3080 3081 | 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 | - - - - - - - - - - - - - - - - - - - - - - - - |
resNamePtr->refNsPtr = NULL;
resNamePtr->refCount = 0;
nsPtr->refCount++;
NsNameSetInternalRep(objPtr, resNamePtr);
}
return objPtr;
}
|
| ︙ |
Changes to generic/tclOOInfo.c.
| ︙ | |||
43 44 45 46 47 48 49 | 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 | - - + - - + | static Tcl_ObjCmdProc InfoClassSubsCmd; static Tcl_ObjCmdProc InfoClassSupersCmd; static Tcl_ObjCmdProc InfoClassVariablesCmd; /* * List of commands that are used to implement the [info object] subcommands. */ |
| ︙ | |||
141 142 143 144 145 146 147 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | - - + + + + + |
Tcl_Command infoCmd;
Tcl_Obj *mapDict;
/*
* Build the ensembles used to implement [info object] and [info class].
*/
|
| ︙ |
Changes to generic/tclProcess.c.
| ︙ | |||
48 49 50 51 52 53 54 | 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 | - - - - - + + + + + + + + + + + + + | Tcl_Size resolvedPid); static void FreeProcessInfo(ProcessInfo *info); static int RefreshProcessInfo(ProcessInfo *info, int options); static TclProcessWaitStatus WaitProcessStatus(Tcl_Pid pid, Tcl_Size resolvedPid, int options, int *codePtr, Tcl_Obj **msgPtr, Tcl_Obj **errorObjPtr); static Tcl_Obj * BuildProcessStatusObj(ProcessInfo *info); |
| ︙ | |||
747 748 749 750 751 752 753 | 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 | - + - + - + - - - + + + - - - - - - - - - - + + - - + - |
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(autopurge));
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
|
| ︙ |
Changes to generic/tclVar.c.
| ︙ | |||
189 190 191 192 193 194 195 196 197 198 199 200 | 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 | + + + + + + - + + + + + + + | /* * Forward references to functions defined later in this file: */ static void AppendLocals(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *patternPtr, int includeLinks, int justConstants); static Tcl_ObjCmdProc ArrayAnyMoreCmd; static Tcl_ObjCmdProc ArrayDoneSearchCmd; static Tcl_ObjCmdProc ArrayNextElementCmd; static Tcl_ObjCmdProc ArrayStartSearchCmd; static void ArrayPopulateSearch(Tcl_Interp *interp, Tcl_Obj *arrayNameObj, Var *varPtr, ArraySearch *searchPtr); static void ArrayDoneSearch(Interp *iPtr, Var *varPtr, ArraySearch *searchPtr); static Tcl_ObjCmdProc ArrayExistsCmd; static Tcl_ObjCmdProc ArrayForObjCmd; |
| ︙ | |||
237 238 239 240 241 242 243 244 245 246 247 248 249 250 | 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | + + + + + + + + + + + + + + + + + |
const char **errMsgPtr, Tcl_Size *indexPtr);
static Tcl_DupInternalRepProc DupLocalVarName;
static Tcl_FreeInternalRepProc FreeLocalVarName;
static Tcl_FreeInternalRepProc FreeParsedVarName;
static Tcl_DupInternalRepProc DupParsedVarName;
const EnsembleImplMap tclArrayImplMap[] = {
{"anymore", ArrayAnyMoreCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
{"default", ArrayDefaultCmd, TclCompileBasic2Or3ArgCmd, NULL, NULL, 0},
{"donesearch", ArrayDoneSearchCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
{"exists", ArrayExistsCmd, TclCompileArrayExistsCmd, NULL, NULL, 0},
{"for", ArrayForObjCmd, TclCompileBasic3ArgCmd, ArrayForNRCmd, NULL, 0}, // TODO: compile?
{"get", ArrayGetCmd, TclCompileBasic1Or2ArgCmd, NULL, NULL, 0},
{"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},
{NULL, NULL, NULL, NULL, NULL, 0}
};
/*
* Types of Tcl_Objs used to cache variable lookups.
*
* localVarName - INTERNALREP DEFINITION:
* twoPtrValue.ptr1: pointer to name obj in varFramePtr->localCache
* or NULL if it is this same obj
|
| ︙ | |||
4438 4439 4440 4441 4442 4443 4444 | 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
CleanupVar(protectedVarPtr, varPtr);
}
return TCL_ERROR;
}
}
return TCL_OK;
}
|
| ︙ |
Changes to generic/tclZipfs.c.
| ︙ | |||
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | + + + + + + + + + + + + + + - - - - - + + + + + - - + + - - - - - - - + + + + + + + - - + + |
int mask);
static int ZipChannelWrite(void *instanceData,
const char *buf, int toWrite, int *errloc);
static int TclZipfsInitEncodingDirs(void);
static int TclZipfsMountExe(void);
static int TclZipfsMountShlib(void);
static Tcl_ObjCmdProc ZipFSMkImgObjCmd;
static Tcl_ObjCmdProc ZipFSMkZipObjCmd;
static Tcl_ObjCmdProc ZipFSLMkImgObjCmd;
static Tcl_ObjCmdProc ZipFSLMkZipObjCmd;
static Tcl_ObjCmdProc ZipFSMountObjCmd;
static Tcl_ObjCmdProc ZipFSMountBufferObjCmd;
static Tcl_ObjCmdProc ZipFSUnmountObjCmd;
static Tcl_ObjCmdProc ZipFSMkKeyObjCmd;
static Tcl_ObjCmdProc ZipFSExistsObjCmd;
static Tcl_ObjCmdProc ZipFSInfoObjCmd;
static Tcl_ObjCmdProc ZipFSListObjCmd;
static Tcl_ObjCmdProc ZipFSCanonicalObjCmd;
static Tcl_ObjCmdProc ZipFSRootObjCmd;
/*
* Define the ZIP filesystem dispatch table.
*/
static const Tcl_Filesystem zipfsFilesystem = {
"zipfs",
sizeof(Tcl_Filesystem),
TCL_FILESYSTEM_VERSION_2,
ZipFSPathInFilesystemProc,
|
| ︙ | |||
534 535 536 537 538 539 540 541 542 543 544 545 546 547 | 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 | + + + + + + + + + + + + + + + + + + + + + |
NULL, /* Set blocking mode for raw channel. */
NULL, /* Function to flush channel. */
NULL, /* Function to handle bubbled events. */
ZipChannelWideSeek,
NULL, /* Thread action function. */
NULL, /* Truncate function. */
};
/*
* The description of the [zipfs] ensemble command.
*/
const EnsembleImplMap tclZipfsImplMap[] = {
{"mkimg", ZipFSMkImgObjCmd, NULL, NULL, NULL, 1},
{"mkzip", ZipFSMkZipObjCmd, NULL, NULL, NULL, 1},
{"lmkimg", ZipFSLMkImgObjCmd, NULL, NULL, NULL, 1},
{"lmkzip", ZipFSLMkZipObjCmd, NULL, NULL, NULL, 1},
{"mount", ZipFSMountObjCmd, NULL, NULL, NULL, 1},
{"mountdata", ZipFSMountBufferObjCmd, NULL, NULL, NULL, 1},
{"unmount", ZipFSUnmountObjCmd, NULL, NULL, NULL, 1},
{"mkkey", ZipFSMkKeyObjCmd, NULL, NULL, NULL, 1},
{"exists", ZipFSExistsObjCmd, NULL, NULL, NULL, 1},
{"find", NULL, NULL, NULL, NULL, 0},
{"info", ZipFSInfoObjCmd, NULL, NULL, NULL, 1},
{"list", ZipFSListObjCmd, NULL, NULL, NULL, 1},
{"canonical", ZipFSCanonicalObjCmd, NULL, NULL, NULL, 1},
{"root", ZipFSRootObjCmd, NULL, NULL, NULL, 1},
{NULL, NULL, NULL, NULL, NULL, 0}
};
/*
*------------------------------------------------------------------------
*
* TclIsZipfsPath --
*
* Checks if the passed path has a zipfs volume prefix.
|
| ︙ | |||
4302 4303 4304 4305 4306 4307 4308 | 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 | - + | * * Side effects: * May mount the archive at the ZIPFS_APP_MOUNT mount point. * *------------------------------------------------------------------------- */ static int |
| ︙ | |||
4351 4352 4353 4354 4355 4356 4357 | 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 | - + | * * Side effects: * May mount the archive at the ZIPFS_ZIP_MOUNT mount point. * *------------------------------------------------------------------------- */ static int |
| ︙ | |||
6399 6400 6401 6402 6403 6404 6405 | 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 | - - - - - - - - - - - - - - - - - - - + + + + - + |
*-------------------------------------------------------------------------
*/
int
TclZipfs_Init(
Tcl_Interp *interp) /* Current interpreter. */
{
|
| ︙ | |||
6447 6448 6449 6450 6451 6452 6453 | 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 | - - - - - - - - - - - - |
WriteLock();
if (!ZipFS.initialized) {
ZipfsSetup();
}
Unlock();
if (interp) {
|
| ︙ |
Changes to generic/tclZlib.c.
| ︙ | |||
228 229 230 231 232 233 234 | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + |
NULL, /* Flush proc. */
ZlibTransformEventHandler,
NULL, /* Seek proc. */
NULL, /* Thread action proc. */
NULL /* Truncate proc. */
};
|
| ︙ | |||
4107 4108 4109 4110 4111 4112 4113 | 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 | + - + + + - - - - - - |
Tcl_SetChannelError(chanDataPtr->parent, errObj);
*errorCodePtr = EINVAL;
return -1;
}
/*
*----------------------------------------------------------------------
*
|
| ︙ |
Changes to library/icu.tcl.
| ︙ | |||
16 17 18 19 20 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 | 16 17 18 19 20 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 | + + + + + + + - - + + - + + - - - |
::tcl::unsupported::loadIcu
namespace eval ::tcl::unsupported::icu {
# Map Tcl encoding names to ICU and back. Note ICU has multiple aliases
# for the same encoding.
variable tclToIcu
variable icuToTcl
variable Initialised 0
proc LogError {message} {
puts stderr $message
}
# Constructs the full mappings between Tcl and ICU names for encodings.
proc Init {} {
variable tclToIcu
variable icuToTcl
variable Initialised
if {$Initialised} {
return
} else {
set initialised 1
}
# There are some special cases where names do not line up
# at all. Map Tcl -> ICU
array set specialCases {
ebcdic ebcdic-cp-us
macCentEuro maccentraleurope
utf16 UTF16_PlatformEndian
utf-16be UnicodeBig
utf-16le UnicodeLittle
utf32 UTF32_PlatformEndian
}
# Ignore all errors. Do not want to hold up Tcl
# if ICU not available
try {
foreach tclName [encoding names] {
try {
set icuNames [aliases $tclName]
|
| ︙ | |||
122 123 124 125 126 127 128 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + - + |
# the empty string in case not found.
proc icuToTcl {icuName} {
Init
proc icuToTcl {icuName} {
variable icuToTcl
return [lindex $icuToTcl($icuName) 0]
}
|
Changes to library/init.tcl.
| ︙ | |||
88 89 90 91 92 93 94 | 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 | - - - - - - - - - - - - - - |
}
}
namespace eval tcl::Pkg {}
# Setup the unknown package handler
|
| ︙ |
Changes to tests/interp.test.
| ︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 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 | + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
}
::tcltest::loadTestedCommands
catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testinterpdelete [llength [info commands testinterpdelete]]
set hidden_cmds [list {*}{
|
| ︙ |
Changes to tests/namespace.test.
| ︙ | |||
3369 3370 3371 3372 3373 3374 3375 3376 3377 | 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 | + + + + + + + + + - - - - - + + + + |
test namespace-55.1 {compiled ensembles inside compiled ensembles: Bug 6d2f249a01} {
info class [format %s constructor] oo::object
} ""
test namespace-55.2 {compiled ensembles inside safe interpreters (for safe sub-commands), bug [1095bf7f756f9aed]} -setup {
interp create -safe si
proc findBytecode {setup descriptor} {
foreach op [dict values [dict get $descriptor instructions]] {
if {[lindex $op 0] eq "dictFirst"} {
return $op
}
}
return [join [dict get $descriptor instructions] "\n"]
}
} -body {
set code {
proc test_comp_dict d { dict for {k v} $d {expr $v} }
|
| ︙ |