Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch frq-3527238 Through [a80aa8d5d3] Excluding Merge-Ins
This is equivalent to a diff from 5199131175 to a80aa8d5d3
|
2012-05-23
| ||
| 09:19 | added -binary option for "dde servername" check-in: b087d03c2b user: jan.nijtmans tags: frq-3527238 | |
|
2012-05-22
| ||
| 09:15 | better unicode detection: Unicode always ends with two zero-bytes check-in: a80aa8d5d3 user: jan.nijtmans tags: frq-3527238 | |
|
2012-05-21
| ||
| 17:08 | Use [package prefer latest] to force valgrinding to use a version of Thread suitable for the whole t... check-in: fe1400c626 user: dgp tags: trunk | |
| 12:12 | update doc check-in: 6081ecfbdf user: jan.nijtmans tags: frq-3527238 | |
| 11:31 | TIP #106: Add Encoding Abilities to the [dde] Command check-in: caff0b1e87 user: jan.nijtmans tags: trunk | |
|
2012-05-16
| ||
| 09:29 | FRQ 3527238: first experiment implementing CF_UNICODETEXT for dde check-in: ba88b2a19d user: jan.nijtmans tags: frq-3527238 | |
|
2012-05-11
| ||
| 12:50 | fix handling of closing '\0' for -binary data update dde version to 1.4.0 Closed-Leaf check-in: 5199131175 user: jan.nijtmans tags: tip-106-impl | |
|
2012-05-10
| ||
| 22:01 | merge trunk check-in: 965fe4924b user: jan.nijtmans tags: tip-106-impl | |
Changes to ChangeLog.
|
Changes to doc/dde.n.
| ︙ | |||
79 80 81 82 83 84 85 | 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 | - - + + - - - + + | work on. The \fIdata\fR field is given to the remote application. Typically, the application treats the \fIdata\fR field as a script, and the script is run in the application. The \fB\-async\fR option requests asynchronous invocation. The command returns an error message if the script did not run, unless the \fB\-async\fR flag was used, in which case the command returns immediately with no error. .VS 8.6 |
| ︙ |
Changes to doc/expr.n.
| ︙ | |||
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | + - + - + - |
.PP
returns \fB4.0\fR, not \fB4\fR.
.SS "STRING OPERATIONS"
.PP
String values may be used as operands of the comparison operators,
although the expression evaluator tries to do comparisons as integer
or floating-point when it can,
i.e., when all arguments to the operator allow numeric interpretations,
except in the case of the \fBeq\fR and \fBne\fR operators.
If one of the operands of a comparison is a string and the other
has a numeric value, a canonical string representation of the numeric
operand value is generated to compare with the string operand.
Canonical string representation for integer values is a decimal string
format. Canonical string representation for floating-point values
is that produced by the \fB%g\fR format specifier of Tcl's
\fBformat\fR command. For example, the commands
.PP
.CS
\fBexpr\fR {"0x03" > "2"}
|
| ︙ |
Changes to generic/tcl.decls.
| ︙ | |||
2342 2343 2344 2345 2346 2347 2348 | 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 | - + - + |
declare 1 win {
char *Tcl_WinTCharToUtf(const TCHAR *str, int len, Tcl_DString *dsPtr)
}
################################
# Mac OS X specific functions
|
| ︙ |
Changes to generic/tclCmdAH.c.
| ︙ | |||
57 58 59 60 61 62 63 64 65 66 67 68 69 70 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | + | static Tcl_NRPostProc ForSetupCallback; static Tcl_NRPostProc ForCondCallback; static Tcl_NRPostProc ForNextCallback; static Tcl_NRPostProc ForPostNextCallback; static Tcl_NRPostProc ForeachLoopStep; static Tcl_NRPostProc EvalCmdErrMsg; static Tcl_ObjCmdProc BadFileSubcommand; static Tcl_ObjCmdProc FileAttrAccessTimeCmd; static Tcl_ObjCmdProc FileAttrIsDirectoryCmd; static Tcl_ObjCmdProc FileAttrIsExecutableCmd; static Tcl_ObjCmdProc FileAttrIsExistingCmd; static Tcl_ObjCmdProc FileAttrIsFileCmd; static Tcl_ObjCmdProc FileAttrIsOwnedCmd; static Tcl_ObjCmdProc FileAttrIsReadableCmd; |
| ︙ | |||
577 578 579 580 581 582 583 | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 | - + |
Tcl_DStringFree(&ds);
}
Tcl_FreeEncoding(encoding);
break;
}
case ENC_DIRS:
|
| ︙ | |||
624 625 626 627 628 629 630 | 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | - + + + |
int
EncodingDirsObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
|
| ︙ | |||
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 | 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
newName = Tcl_DStringAppend(&newBuf, unsafeInfo[i].cmdName, -1);
if (TclRenameCommand(interp, oldName, "___tmp") != TCL_OK
|| Tcl_HideCommand(interp, "___tmp", newName) != TCL_OK) {
Tcl_Panic("problem making 'file %s' safe: %s",
unsafeInfo[i].cmdName,
Tcl_GetString(Tcl_GetObjResult(interp)));
}
Tcl_CreateObjCommand(interp, oldName, BadFileSubcommand,
(ClientData) unsafeInfo[i].cmdName, NULL);
}
}
Tcl_DStringFree(&oldBuf);
Tcl_DStringFree(&newBuf);
/*
* Ugh. The [file] command is now actually safe, but it is assumed by
* scripts that it is not, which messes up security policies. [Bug
* 3211758]
*/
if (Tcl_HideCommand(interp, "file", "file") != TCL_OK) {
Tcl_Panic("problem making 'file' safe: %s",
Tcl_GetString(Tcl_GetObjResult(interp)));
}
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* BadFileSubcommand --
*
* Command used to act as a backstop implementation when subcommands of
* "file" are unsafe (the real implementations of the subcommands are
* hidden). The clientData is always the full official subcommand name.
*
* Results:
* A standard Tcl result (always a TCL_ERROR).
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
static int
BadFileSubcommand(
ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
const char *subcommandName = (const char *) clientData;
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"not allowed to invoke subcommand %s of file", subcommandName));
Tcl_SetErrorCode(interp, "TCL", "SAFE", "SUBCOMMAND", NULL);
return TCL_ERROR;
}
/*
*----------------------------------------------------------------------
*
* FileAttrAccessTimeCmd --
*
* This function is invoked to process the "file atime" Tcl command. See
|
| ︙ |
Changes to generic/tclCmdMZ.c.
| ︙ | |||
3754 3755 3756 3757 3758 3759 3760 | 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 | + - - + + + + + |
TclNewObj(indicesObj);
}
for (j=0 ; j<=info.nsubs ; j++) {
if (indexVarObj != NULL) {
Tcl_Obj *rangeObjAry[2];
if (info.matches[j].end > 0) {
|
| ︙ |
Changes to generic/tclFileName.c.
| ︙ | |||
859 860 861 862 863 864 865 | 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 | - + |
case TCL_PLATFORM_UNIX:
/*
* Append a separator if needed.
*/
if (length > 0 && (start[length-1] != '/')) {
Tcl_AppendToObj(prefix, "/", 1);
|
| ︙ | |||
895 896 897 898 899 900 901 | 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | - + |
/*
* Check to see if we need to append a separator.
*/
if ((length > 0) &&
(start[length-1] != '/') && (start[length-1] != ':')) {
Tcl_AppendToObj(prefix, "/", 1);
|
| ︙ |
Changes to generic/tclOO.c.
| ︙ | |||
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | 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 | + + + + + + + + + + - - - - - - - - - - - - |
}, clsMethods[] = {
DCM("create", 1, TclOO_Class_Create),
DCM("new", 1, TclOO_Class_New),
DCM("createWithNamespace", 0, TclOO_Class_CreateNs),
{NULL, 0, {0, NULL, NULL, NULL, NULL}}
};
/*
* And for the oo::class constructor...
*/
static const Tcl_MethodType classConstructor = {
TCL_OO_METHOD_VERSION_CURRENT,
"oo::class constructor",
TclOO_Class_Constructor, NULL, NULL
};
/*
* Scripted parts of TclOO. First, the master script (cannot be outside this
* file).
*/
static const char *initScript =
"package ifneeded TclOO " TCLOO_PATCHLEVEL " {# Already present, OK?};"
"namespace eval ::oo { variable version " TCLOO_VERSION " };"
"namespace eval ::oo { variable patchlevel " TCLOO_PATCHLEVEL " };";
/* "tcl_findLibrary tcloo $oo::version $oo::version" */
/* " tcloo.tcl OO_LIBRARY oo::library;"; */
|
| ︙ | |||
336 337 338 339 340 341 342 343 344 345 346 | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | + - - + |
DeletedHelpersNamespace);
fPtr->epoch = 0;
fPtr->tsdPtr = tsdPtr;
TclNewLiteralStringObj(fPtr->unknownMethodNameObj, "unknown");
TclNewLiteralStringObj(fPtr->constructorName, "<constructor>");
TclNewLiteralStringObj(fPtr->destructorName, "<destructor>");
TclNewLiteralStringObj(fPtr->clonedName, "<cloned>");
TclNewLiteralStringObj(fPtr->defineName, "::oo::define");
Tcl_IncrRefCount(fPtr->unknownMethodNameObj);
Tcl_IncrRefCount(fPtr->constructorName);
Tcl_IncrRefCount(fPtr->destructorName);
Tcl_IncrRefCount(fPtr->clonedName);
|
| ︙ | |||
414 415 416 417 418 419 420 | 412 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 | - + - - - - - - - - - - + + - |
*/
TclNewLiteralStringObj(argsPtr, "originObject");
Tcl_IncrRefCount(argsPtr);
bodyPtr = Tcl_NewStringObj(clonedBody, -1);
TclOONewProcMethod(interp, fPtr->objectCls, 0, fPtr->clonedName, argsPtr,
bodyPtr, NULL);
|
| ︙ | |||
525 526 527 528 529 530 531 | 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | - - - - + + + + + |
Tcl_Interp *interp) /* The interpreter containing the OO system
* foundation. */
{
Foundation *fPtr = GetFoundation(interp);
DelRef(fPtr->objectCls->thisPtr);
DelRef(fPtr->objectCls);
|
| ︙ | |||
785 786 787 788 789 790 791 | 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 | - + |
/*
* If this is a rename and not a delete of the object, we just flush the
* cache of the object name.
*/
if (flags & TCL_TRACE_RENAME) {
if (oPtr->cachedNameObj) {
|
| ︙ | |||
1040 1041 1042 1043 1044 1045 1046 | 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 | - + |
* Squelch our filter list.
*/
if (clsPtr->filters.num) {
Tcl_Obj *filterObj;
FOREACH(filterObj, clsPtr->filters) {
|
| ︙ | |||
1119 1120 1121 1122 1123 1124 1125 | 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 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 | - + - + - + |
TclOORemoveFromInstances(oPtr, mixinPtr);
}
if (i) {
ckfree(oPtr->mixins.list);
}
FOREACH(filterObj, oPtr->filters) {
|
| ︙ | |||
1176 1177 1178 1179 1180 1181 1182 | 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 | - + |
}
Tcl_DeleteHashTable(clsPtr->metadataPtr);
ckfree(clsPtr->metadataPtr);
clsPtr->metadataPtr = NULL;
}
FOREACH(filterObj, clsPtr->filters) {
|
| ︙ | |||
1221 1222 1223 1224 1225 1226 1227 | 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 | - + |
TclOODelMethodRef(mPtr);
}
Tcl_DeleteHashTable(&clsPtr->classMethods);
TclOODelMethodRef(clsPtr->constructorPtr);
TclOODelMethodRef(clsPtr->destructorPtr);
FOREACH(variableObj, clsPtr->variables) {
|
| ︙ | |||
2486 2487 2488 2489 2490 2491 2492 | 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 | - + - + |
if (oPtr->mapMethodNameProc != NULL) {
register Class **startClsPtr = &startCls;
Tcl_Obj *mappedMethodName = Tcl_DuplicateObj(methodNamePtr);
result = oPtr->mapMethodNameProc(interp, (Tcl_Object) oPtr,
(Tcl_Class *) startClsPtr, mappedMethodName);
if (result != TCL_OK) {
|
| ︙ |
Changes to generic/tclOOBasic.c.
| ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + + | #endif #include "tclInt.h" #include "tclOOInt.h" static inline Tcl_Object *AddConstructionFinalizer(Tcl_Interp *interp); static int AfterNRDestructor(ClientData data[], Tcl_Interp *interp, int result); static int DecrRefsPostClassConstructor(ClientData data[], Tcl_Interp *interp, int result); static int FinalizeConstruction(ClientData data[], Tcl_Interp *interp, int result); static int FinalizeEval(ClientData data[], Tcl_Interp *interp, int result); static int RestoreFrame(ClientData data[], Tcl_Interp *interp, int result); |
| ︙ | |||
62 63 64 65 66 67 68 69 70 71 72 73 74 75 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
if (result != TCL_OK) {
return result;
}
Tcl_SetObjResult(interp, TclOOObjectName(interp, oPtr));
return TCL_OK;
}
/*
* ----------------------------------------------------------------------
*
* TclOO_Class_Constructor --
*
* Implementation for oo::class constructor.
*
* ----------------------------------------------------------------------
*/
int
TclOO_Class_Constructor(
ClientData clientData,
Tcl_Interp *interp,
Tcl_ObjectContext context,
int objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
Tcl_Obj *invoke[3];
if (objc-1 > Tcl_ObjectContextSkippedArgs(context)) {
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
"?definitionScript?");
return TCL_ERROR;
} else if (objc == Tcl_ObjectContextSkippedArgs(context)) {
return TCL_OK;
}
/*
* Delegate to [oo::define] to do the work.
*/
invoke[0] = oPtr->fPtr->defineName;
invoke[1] = TclOOObjectName(interp, oPtr);
invoke[2] = objv[objc-1];
/*
* Must add references or errors in configuration script will cause
* trouble.
*/
Tcl_IncrRefCount(invoke[0]);
Tcl_IncrRefCount(invoke[1]);
Tcl_IncrRefCount(invoke[2]);
TclNRAddCallback(interp, DecrRefsPostClassConstructor,
invoke[0], invoke[1], invoke[2], NULL);
/*
* Tricky point: do not want the extra reported level in the Tcl stack
* trace, so use TCL_EVAL_NOERR.
*/
return TclNREvalObjv(interp, 3, invoke, TCL_EVAL_NOERR, NULL);
}
static int
DecrRefsPostClassConstructor(
ClientData data[],
Tcl_Interp *interp,
int result)
{
TclDecrRefCount((Tcl_Obj *) data[0]);
TclDecrRefCount((Tcl_Obj *) data[1]);
TclDecrRefCount((Tcl_Obj *) data[2]);
return result;
}
/*
* ----------------------------------------------------------------------
*
* TclOO_Class_Create --
*
* Implementation for oo::class->create method.
|
| ︙ | |||
1135 1136 1137 1138 1139 1140 1141 1142 1143 | 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
/*
* Return the name of the cloned object.
*/
Tcl_SetObjResult(interp, TclOOObjectName(interp, (Object *) o2Ptr));
return TCL_OK;
}
/*
|
Changes to generic/tclOODefineCmds.c.
| ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + + + + + |
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "tclInt.h"
#include "tclOOInt.h"
/*
* The maximum length of fully-qualified object name to use in an errorinfo
* message. Longer than this will be curtailed.
*/
#define OBJNAME_LENGTH_IN_ERRORINFO_LIMIT 30
/*
* Some things that make it easier to declare a slot.
*/
struct DeclaredSlot {
const char *name;
const Tcl_MethodType getterType;
|
| ︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + + | /* * Forward declarations. */ static inline void BumpGlobalEpoch(Tcl_Interp *interp, Class *classPtr); static Tcl_Command FindCommand(Tcl_Interp *interp, Tcl_Obj *stringObj, Tcl_Namespace *const namespacePtr); static void GenerateErrorInfo(Tcl_Interp *interp, Object *oPtr, Tcl_Obj *savedNameObj, const char *typeOfSubject); static inline Class * GetClassInOuterContext(Tcl_Interp *interp, Tcl_Obj *className, const char *errMsg); static inline int InitDefineContext(Tcl_Interp *interp, Tcl_Namespace *namespacePtr, Object *oPtr, int objc, Tcl_Obj *const objv[]); static inline void RecomputeClassCacheFlag(Object *oPtr); static int RenameDeleteMethod(Tcl_Interp *interp, Object *oPtr, |
| ︙ | |||
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 | 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 | + - + + + + + + + + |
*/
Tcl_Object
TclOOGetDefineCmdContext(
Tcl_Interp *interp)
{
Interp *iPtr = (Interp *) interp;
Tcl_Object object;
if ((iPtr->varFramePtr == NULL)
|| (iPtr->varFramePtr->isProcCallFrame != FRAME_IS_OO_DEFINE)) {
Tcl_AppendResult(interp, "this command may only be called from within"
" the context of an ::oo::define or ::oo::objdefine command",
NULL);
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return NULL;
}
|
| ︙ | |||
722 723 724 725 726 727 728 729 730 731 732 733 734 735 | 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
Tcl_AppendResult(interp, errMsg, NULL);
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS",
TclGetString(className), NULL);
return NULL;
}
return oPtr->classPtr;
}
/*
* ----------------------------------------------------------------------
*
* GenerateErrorInfo --
* Factored out code to generate part of the error trace messages.
*
* ----------------------------------------------------------------------
*/
static void
GenerateErrorInfo(
Tcl_Interp *interp, /* Where to store the error info trace. */
Object *oPtr, /* What object (or class) was being configured
* when the error occurred? */
Tcl_Obj *savedNameObj, /* Name of object saved from before script was
* evaluated, which is needed if the object
* goes away part way through execution. OTOH,
* if the object isn't deleted then its
* current name (post-execution) has to be
* used. This matters, because the object
* could have been renamed... */
const char *typeOfSubject) /* Part of the message, saying whether it was
* an object, class or class-as-object that
* was being configured. */
{
int length;
Tcl_Obj *realNameObj = Tcl_ObjectDeleted((Tcl_Object) oPtr)
? savedNameObj : TclOOObjectName(interp, oPtr);
const char *objName = Tcl_GetStringFromObj(realNameObj, &length);
int limit = OBJNAME_LENGTH_IN_ERRORINFO_LIMIT;
int overflow = (length > limit);
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (in definition script for %s \"%.*s%s\" line %d)",
typeOfSubject, (overflow ? limit : length), objName,
(overflow ? "..." : ""), Tcl_GetErrorLine(interp)));
}
/*
* ----------------------------------------------------------------------
*
* TclOODefineObjCmd --
* Implementation of the "oo::define" command. Works by effectively doing
* the same as 'namespace eval', but with extra magic applied so that the
|
| ︙ | |||
775 776 777 778 779 780 781 782 783 | 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 | + + + - - - - - - - + - - - + |
if (InitDefineContext(interp, fPtr->defineNs, oPtr, objc,objv) != TCL_OK){
return TCL_ERROR;
}
AddRef(oPtr);
if (objc == 3) {
Tcl_Obj *objNameObj = TclOOObjectName(interp, oPtr);
Tcl_IncrRefCount(objNameObj);
result = TclEvalObjEx(interp, objv[2], 0,
((Interp *)interp)->cmdFramePtr, 2);
|
| ︙ | |||
894 895 896 897 898 899 900 901 902 | 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 | + + + - - - - - - - + - - - + |
if (InitDefineContext(interp, fPtr->objdefNs, oPtr, objc,objv) != TCL_OK){
return TCL_ERROR;
}
AddRef(oPtr);
if (objc == 3) {
Tcl_Obj *objNameObj = TclOOObjectName(interp, oPtr);
Tcl_IncrRefCount(objNameObj);
result = TclEvalObjEx(interp, objv[2], 0,
((Interp *)interp)->cmdFramePtr, 2);
|
| ︙ | |||
1013 1014 1015 1016 1017 1018 1019 1020 1021 | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 | + + + - - - - + - - - + - - - + - - |
if (InitDefineContext(interp, fPtr->objdefNs, oPtr, objc,objv) != TCL_OK){
return TCL_ERROR;
}
AddRef(oPtr);
if (objc == 2) {
Tcl_Obj *objNameObj = TclOOObjectName(interp, oPtr);
Tcl_IncrRefCount(objNameObj);
result = TclEvalObjEx(interp, objv[1], 0,
((Interp *)interp)->cmdFramePtr, 2);
|
| ︙ |
Changes to generic/tclOOInt.h.
| ︙ | |||
318 319 320 321 322 323 324 325 326 327 328 329 330 331 | 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | + |
* unknown method handler method. */
Tcl_Obj *constructorName; /* Shared object containing the "name" of a
* constructor. */
Tcl_Obj *destructorName; /* Shared object containing the "name" of a
* destructor. */
Tcl_Obj *clonedName; /* Shared object containing the name of a
* "<cloned>" pseudo-constructor. */
Tcl_Obj *defineName; /* Fully qualified name of oo::define. */
} Foundation;
/*
* A call context structure is built when a method is called. They contain the
* chain of method implementations that are to be invoked by a particular
* call, and the process of calling walks the chain, with the [next] command
* proceeding to the next entry in the chain.
|
| ︙ | |||
449 450 451 452 453 454 455 456 457 458 459 460 461 462 | 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | + + + | Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); /* * Method implementations (in tclOOBasic.c). */ MODULE_SCOPE int TclOO_Class_Constructor(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv); MODULE_SCOPE int TclOO_Class_Create(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv); MODULE_SCOPE int TclOO_Class_CreateNs(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv); MODULE_SCOPE int TclOO_Class_New(ClientData clientData, |
| ︙ | |||
515 516 517 518 519 520 521 | 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | - - - - - | Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int TclNRObjectContextInvokeNext(Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv, int skip); MODULE_SCOPE void TclOONewBasicMethod(Tcl_Interp *interp, Class *clsPtr, const DeclaredClassMethod *dcm); |
| ︙ |
Changes to generic/tclOOMethod.c.
| ︙ | |||
1200 1201 1202 1203 1204 1205 1206 | 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 | - - - - - - - - - |
{
CallContext *contextPtr = ((Interp *) interp)->varFramePtr->clientData;
Method *mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr;
Object *declarerPtr;
const char *objectName, *kindName;
int objectNameLen;
|
| ︙ |
Changes to generic/tclPathObj.c.
| ︙ | |||
1083 1084 1085 1086 1087 1088 1089 | 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 | - + |
res = Tcl_DuplicateObj(res);
Tcl_IncrRefCount(res);
}
}
if (length > 0 && ptr[length -1] != '/') {
Tcl_AppendToObj(res, &separator, 1);
|
| ︙ |
Changes to generic/tclPlatDecls.h.
| ︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + - - - - - - - - - - - - | /* !BEGIN!: Do not edit below this line. */ /* * Exported function declarations: */ |
| ︙ | |||
79 80 81 82 83 84 85 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + - - - - |
char *libraryPath);
#endif /* MACOSX */
typedef struct TclPlatStubs {
int magic;
const struct TclPlatStubHooks *hooks;
|
| ︙ | |||
107 108 109 110 111 112 113 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + - - - - - - | #if defined(USE_TCL_STUBS) /* * Inline function declarations: */ |
| ︙ |
Changes to generic/tclStubInit.c.
| ︙ | |||
161 162 163 164 165 166 167 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - - - - |
if (!winTCharEncoding) {
winTCharEncoding = Tcl_GetEncoding(0, "unicode");
}
return Tcl_ExternalToUtfDString(winTCharEncoding,
string, len, dsPtr);
}
|
| ︙ | |||
590 591 592 593 594 595 596 | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | - + - - - - |
TclUnixWaitForFile, /* 38 */
#endif /* MACOSX */
};
static const TclPlatStubs tclPlatStubs = {
TCL_STUB_MAGIC,
0,
|
| ︙ |
Changes to library/dde/pkgIndex.tcl.
| 1 2 3 4 5 6 7 | - + |
|
Changes to library/safe.tcl.
| ︙ | |||
461 462 463 464 465 466 467 | 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 | - - + + + + + + + + + + + + |
} {
::interp alias $slave $command {} [namespace current]::$alias $slave
}
# This alias lets the slave have access to a subset of the 'file'
# command functionality.
|
| ︙ | |||
495 496 497 498 499 500 501 | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | - + + |
return -code error "can't source tm.tcl into slave $slave ($msg)"
}
# Sync the paths used to search for Tcl modules. This can be done only
# now, after tm.tcl was loaded.
namespace upvar ::safe S$slave state
if {[llength $state(tm_path_slave)] > 0} {
|
| ︙ | |||
675 676 677 678 679 680 681 | 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 | - + - + |
-nocomplain 0
-join 0
-tails 0
-- 0
}
if {$::tcl_platform(platform) eq "windows"} {
|
| ︙ | |||
730 731 732 733 734 735 736 | 741 742 743 744 745 746 747 748 749 750 751 752 753 754 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 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 | - + - - - - + - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - + - - + - + |
# we know if -nocomplain is set.
if {$got(-directory)} {
try {
set dir [TranslatePath $slave $virtualdir]
DirInAccessPath $slave $dir
} on error msg {
Log $slave $msg
|
| ︙ | |||
976 977 978 979 980 981 982 | 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 | - - + + - + - - - - - + - - - - - - - - - - - - - - - - + - - + - - - - - - + + + + + - - + - - - + - - - - - - - + + + + + + |
namespace upvar ::safe S$slave state
if {$norm_dir ni $state(access_path,norm)} {
return -code error "\"$dir\": not in access_path"
}
}
|
| ︙ |
Changes to tests/all.tcl.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | + |
# all.tcl --
#
# This file contains a top-level script to run all of the Tcl
# tests. Execute it by invoking "source all.test" when running tcltest
# in this directory.
#
# Copyright (c) 1998-1999 by Scriptics Corporation.
# Copyright (c) 2000 by Ajuba Solutions
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
package prefer latest
package require Tcl 8.5
package require tcltest 2.2
namespace import tcltest::*
configure {*}$argv -testdir [file dir [info script]]
runAllTests
proc exit args {}
|
Changes to tests/dict.test.
| ︙ | |||
1471 1472 1473 1474 1475 1476 1477 | 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 | - + - + - + |
}}
} 1,2
proc linenumber {} {
dict get [info frame -1] line
}
test dict-23.1 {dict compilation crash: Bug 3487626} {
|
| ︙ | |||
1514 1515 1516 1517 1518 1519 1520 | 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 | - + |
j
} f k {
return [expr {$n - [linenumber]}]
}
}
}
}
|
Changes to tests/oo.test.
| ︙ | |||
1970 1971 1972 1973 1974 1975 1976 | 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | - + - + - + - + |
} -result {}
test oo-18.1 {OO: define command support} {
list [catch {oo::define oo::object {error foo}} msg] $msg $errorInfo
} {1 foo {foo
while executing
"error foo"
|
| ︙ | |||
2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 | 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 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 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
"error bar"
(in "::obj eval" script line 1)
invoked from within
"next $script"
(class "::cls" method "eval" line 1)
invoked from within
"obj eval {error bar}"}}
test oo-18.6 {class construction reference management and errors} -setup {
oo::class create super_abc
} -body {
catch {
oo::class create abc {
superclass super_abc
::rename abc ::def
::error foo
}
} msg opt
dict get $opt -errorinfo
} -cleanup {
super_abc destroy
} -result {foo
while executing
"::error foo"
(in definition script for class "::def" line 4)
invoked from within
"oo::class create abc {
superclass super_abc
::rename abc ::def
::error foo
}"}
test oo-18.7 {OO: objdefine command support} -setup {
oo::object create ::inst
} -body {
list [catch {oo::objdefine inst {rename ::inst ::INST;error foo}} msg] $msg $errorInfo
} -cleanup {
catch {::inst destroy}
catch {::INST destroy}
} -result {1 foo {foo
while executing
"error foo"
(in definition script for object "::INST" line 1)
invoked from within
"oo::objdefine inst {rename ::inst ::INST;error foo}"}}
test oo-18.8 {OO: define/self command support} -setup {
oo::class create master
oo::class create ::foo {superclass master}
} -body {
catch {oo::define foo {rename ::foo ::bar; self {error foobar}}} msg opt
dict get $opt -errorinfo
} -cleanup {
master destroy
} -result {foobar
while executing
"error foobar"
(in definition script for class object "::bar" line 1)
invoked from within
"self {error foobar}"
(in definition script for class "::bar" line 1)
invoked from within
"oo::define foo {rename ::foo ::bar; self {error foobar}}"}
test oo-18.9 {OO: define/self command support} -setup {
oo::class create master
set c [oo::class create now_this_is_a_very_very_long_class_name_indeed {
superclass master
}]
} -body {
catch {oo::define $c {error err}} msg opt
dict get $opt -errorinfo
} -cleanup {
master destroy
} -result {err
while executing
"error err"
(in definition script for class "::now_this_is_a_very_very_long..." line 1)
invoked from within
"oo::define $c {error err}"}
test oo-18.10 {OO: define/self command support} -setup {
oo::class create master
oo::class create ::foo {superclass master}
} -body {
catch {oo::define foo {self {rename ::foo {}; error foobar}}} msg opt
dict get $opt -errorinfo
} -cleanup {
master destroy
} -result {foobar
while executing
"error foobar"
(in definition script for class object "::foo" line 1)
invoked from within
"self {rename ::foo {}; error foobar}"
(in definition script for class "::foo" line 1)
invoked from within
"oo::define foo {self {rename ::foo {}; error foobar}}"}
test oo-18.11 {OO: define/self command support} -setup {
oo::class create master
oo::class create ::foo {superclass master}
} -body {
catch {oo::define foo {rename ::foo {}; self {error foobar}}} msg opt
dict get $opt -errorinfo
} -cleanup {
master destroy
} -result {this command cannot be called when the object has been deleted
while executing
"self {error foobar}"
(in definition script for class "::foo" line 1)
invoked from within
"oo::define foo {rename ::foo {}; self {error foobar}}"}
test oo-19.1 {OO: varname method} -setup {
oo::object create inst
oo::objdefine inst export eval
set result {}
inst eval { variable x }
} -body {
|
| ︙ | |||
3185 3186 3187 3188 3189 3190 3191 | 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 | - + |
test oo-33.2 {TIP 380: slots - defaulting} -setup {
set s [SampleSlot new]
} -body {
list [$s destroy; $s unknown] [$s contents]
} -cleanup {
rename $s {}
} -result {{} {a b c destroy unknown}}
|
| ︙ |
Changes to tests/safe.test.
| ︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + - - |
set saveAutoPath $::auto_path
set ::auto_path [info library]
# Force actual loading of the safe package because we use un exported (and
# thus un-autoindexed) APIs in this test result arguments:
catch {safe::interpConfigure}
|
| ︙ | |||
90 91 92 93 94 95 96 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - + |
test safe-3.2 {calling safe::interpCreate on trusted interp} -setup {
catch {safe::interpDelete a}
} -body {
safe::interpCreate a
lsort [a aliases]
} -cleanup {
safe::interpDelete a
|
| ︙ | |||
534 535 536 537 538 539 540 541 542 | 532 533 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 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + |
} -cleanup {
safe::interpDelete $i
} -result {}
test safe-12.7 {glob is restricted} -setup {
set i [safe::interpCreate]
} -body {
$i eval glob *
} -returnCodes error -cleanup {
safe::interpDelete $i
} -result {permission denied}
proc buildEnvironment {filename} {
upvar 1 testdir testdir testdir2 testdir2 testfile testfile
set testdir [makeDirectory deletethisdir]
set testdir2 [makeDirectory deletemetoo $testdir]
set testfile [makeFile {} $filename $testdir2]
}
#### New tests for Safe base glob, with patches @ Bug 2964715
test safe-13.1 {glob is restricted [Bug 2964715]} -setup {
set i [safe::interpCreate]
} -body {
$i eval glob *
} -returnCodes error -cleanup {
safe::interpDelete $i
} -result {permission denied}
test safe-13.2 {mimic the valid glob call by ::tcl::tm::UnknownHandler [Bug 2964715]} -setup {
set i [safe::interpCreate]
buildEnvironment deleteme.tm
} -body {
::safe::interpAddToAccessPath $i $testdir2
set result [$i eval glob -nocomplain -directory $testdir2 *.tm]
if {$result eq [list $testfile]} {
return "glob match"
} else {
return "no match: $result"
}
} -cleanup {
safe::interpDelete $i
removeDirectory $testdir
} -result {glob match}
test safe-13.3 {cf 13.2 but test glob failure when -directory is outside access path [Bug 2964715]} -setup {
set i [safe::interpCreate]
buildEnvironment deleteme.tm
} -body {
$i eval glob -directory $testdir2 *.tm
} -returnCodes error -cleanup {
safe::interpDelete $i
removeDirectory $testdir
} -result {permission denied}
test safe-13.4 {another valid glob call [Bug 2964715]} -setup {
set i [safe::interpCreate]
buildEnvironment deleteme.tm
} -body {
::safe::interpAddToAccessPath $i $testdir
::safe::interpAddToAccessPath $i $testdir2
set result [$i eval \
glob -nocomplain -directory $testdir [file join deletemetoo *.tm]]
if {$result eq [list $testfile]} {
return "glob match"
} else {
return "no match: $result"
}
} -cleanup {
safe::interpDelete $i
removeDirectory $testdir
} -result {glob match}
test safe-13.5 {as 13.4 but test glob failure when -directory is outside access path [Bug 2964715]} -setup {
set i [safe::interpCreate]
buildEnvironment deleteme.tm
} -body {
::safe::interpAddToAccessPath $i $testdir2
$i eval \
glob -directory $testdir [file join deletemetoo *.tm]
} -returnCodes error -cleanup {
safe::interpDelete $i
removeDirectory $testdir
} -result {permission denied}
test safe-13.6 {as 13.4 but test silent failure when result is outside access_path [Bug 2964715]} -setup {
set i [safe::interpCreate]
buildEnvironment deleteme.tm
} -body {
::safe::interpAddToAccessPath $i $testdir
$i eval \
glob -nocomplain -directory $testdir [file join deletemetoo *.tm]
} -cleanup {
safe::interpDelete $i
removeDirectory $testdir
|
Changes to tests/socket.test.
| ︙ | |||
60 61 62 63 64 65 66 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + | # listening at port 2048. If all fails, a message is printed and the tests # using the remote server are not performed. package require tcltest 2 namespace import -force ::tcltest::* # Some tests require the Thread package or exec command |
| ︙ |
Changes to tests/switch.test.
| ︙ | |||
532 533 534 535 536 537 538 | 532 533 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 583 584 585 586 587 588 589 590 591 592 593 594 595 | - + - + + + + + + + + + + + - + - + - + |
test switch-11.6 {-matchvar unwritable} {
set x {}
list [catch {switch -regexp -matchvar x(x) -- abc . {set x}} msg] $x $msg
} {1 {} {can't set "x(x)": variable isn't array}}
test switch-12.1 {regexp matching with -indexvar} {
switch -regexp -indexvar x -- abc {.(.). {set x}}
|
| ︙ | |||
593 594 595 596 597 598 599 | 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 | - + |
} {1 - - {can't set "x(x)": variable isn't array}}
test switch-13.6 {-indexvar -matchvar combinations} {
set x -
set y -
list [catch {
switch -regexp -indexvar x -matchvar y(y) abc {. {list $x $y}}
} msg] $x $y $msg
|
| ︙ |
Changes to tests/zlib.test.
| ︙ | |||
143 144 145 146 147 148 149 150 151 152 153 154 155 156 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | + |
fconfigure $sin -translation binary
zlib push gunzip $sin
after 1000 {set total timeout}
fcopy $sin $fout -command {apply {{c {e {}}} {
set ::total [expr {$e eq {} ? $c : $e}]
}}}
vwait total
after cancel {set total timeout}
} finally {
close $sin
}
append total --> [file size $file]
} -cleanup {
close $fout
close $srv
|
| ︙ | |||
222 223 224 225 226 227 228 229 230 231 232 233 234 235 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | + |
update
set fout [open $file wb]
after 1000 {set ::total timeout}
fcopy $sin $fout -command {apply {{c {e {}}} {
set ::total [expr {$e eq {} ? $c : $e}]
}}}
vwait ::total
after cancel {set ::total timeout}
close $sin; close $fout
list read $::total size [file size $file]
} -cleanup {
close $srv
removeFile $file
} -returnCodes {ok error} -result {read 81920 size 81920}
test zlib-9.4 "socket fcopy bg (gzip)" -constraints zlib -setup {
|
| ︙ | |||
247 248 249 250 251 252 253 254 255 256 257 258 259 260 | 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | + |
update
set fout [open $file wb]
after 1000 {set ::total timeout}
fcopy $sin $fout -command {apply {{c {e {}}} {
set ::total [expr {$e eq {} ? $c : $e}]
}}}
vwait ::total
after cancel {set ::total timeout}
close $sin; close $fout
list read $::total size [file size $file]
} -cleanup {
close $srv
removeFile $file
} -result {read 81920 size 81920}
test zlib-9.5 "socket fcopy incremental (gzip)" -constraints zlib -setup {
|
| ︙ | |||
280 281 282 283 284 285 286 287 288 289 290 291 292 293 | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | + |
chan configure $sin -translation binary
zlib push gunzip $sin
update
set fout [open $file wb]
after 1000 {set ::total timeout}
fcopy $sin $fout -size 8192 -command [list zlib95copy $sin $fout 0]
vwait ::total
after cancel {set ::total timeout}
close $sin; close $fout
list $::total size [file size $file]
} -cleanup {
close $srv
rename zlib95copy {}
removeFile $file
} -result {{eof 81920} size 81920}
|
| ︙ | |||
308 309 310 311 312 313 314 315 316 317 318 319 320 321 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | + |
set d [read $s]
if {[eof $s]} {
chan event $s readable {}
set ::total [list eof [string length $d]]
}
}} $s]
vwait ::total
after cancel {set ::total timeout}
close $s
set ::total
} -cleanup {
close $srv
unset -nocomplain total
} -result {eof 500}
test zlib-9.7 "bug #2818131 (compress)" -constraints zlib -setup {
|
| ︙ | |||
335 336 337 338 339 340 341 342 343 344 345 346 347 348 | 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | + |
set d [read $s]
if {[eof $s]} {
chan event $s readable {}
set ::total [list eof [string length $d]]
}
}} $s]
vwait ::total
after cancel {set ::total timeout}
close $s
set ::total
} -cleanup {
close $srv
unset -nocomplain total
} -result {eof 500}
test zlib-9.8 "bug #2818131 (deflate)" -constraints zlib -setup {
|
| ︙ | |||
362 363 364 365 366 367 368 369 370 371 372 373 374 375 | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | + |
set d [read $s]
if {[eof $s]} {
chan event $s readable {}
set ::total [list eof [string length $d]]
}
}} $s]
vwait ::total
after cancel {set ::total timeout}
close $s
set ::total
} -cleanup {
unset -nocomplain total
close $srv
} -result {eof 500}
test zlib-9.9 "bug #2818131 (gzip mismatch)" -constraints zlib -setup {
|
| ︙ | |||
392 393 394 395 396 397 398 399 400 401 402 403 404 405 | 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | + |
if {[eof $s]} {
chan event $s readable {}
set ::total [list eof [string length $d]]
}
}} $s]
vwait ::total
} finally {
after cancel {set ::total timeout}
close $s
}
set ::total
} -cleanup {
unset -nocomplain total
close $srv
rename bgerror {}
|
| ︙ | |||
424 425 426 427 428 429 430 431 432 433 434 435 436 437 | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | + |
if {[eof $s]} {
chan event $s readable {}
set ::total [list eof [string length $d]]
}
}} $s]
vwait ::total
} finally {
after cancel {set ::total timeout}
close $s
}
set ::total
} -cleanup {
unset -nocomplain total
close $srv
rename bgerror {}
|
| ︙ | |||
456 457 458 459 460 461 462 463 464 465 466 467 468 469 | 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | + |
if {[eof $s]} {
chan event $s readable {}
set ::total [list eof [string length $d]]
}
}} $s]
vwait ::total
} finally {
after cancel {set ::total timeout}
close $s
}
set ::total
} -cleanup {
unset -nocomplain total
close $srv
rename bgerror {}
|
| ︙ | |||
498 499 500 501 502 503 504 505 506 507 508 509 510 511 | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | + + |
}} $s]
after idle [list apply {{s} {
puts $s test
chan close $s
after 100 {set ::total done}
}} $s]
vwait ::total
after cancel {set ::total timeout}
after cancel {set ::total done}
set ::total
} -cleanup {
close $srv
rename bgerror {}
} -returnCodes error \
-result {bad event name "xyzzy": must be readable or writable}
test zlib-10.1 "bug #2818131 (mismatch read)" -constraints {
|
| ︙ | |||
534 535 536 537 538 539 540 541 542 543 544 545 546 547 | 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | + + |
chan event $s readable [list zlibRead $s]
after idle [list apply {{s} {
puts $s test
chan close $s
after 100 {set ::total done}
}} $s]
vwait ::total
after cancel {set ::total timeout}
after cancel {set ::total done}
set ::total
} -cleanup {
close $srv
rename bgerror {}
rename zlibRead {}
} -result {error {invalid block type}}
test zlib-10.2 "bug #2818131 (mismatch gets)" -constraints {
|
| ︙ | |||
572 573 574 575 576 577 578 579 580 581 582 583 584 585 | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | + + |
chan event $s readable [list zlibRead $s]
after idle [list apply {{s} {
puts $s test
chan close $s
after 100 {set ::total done}
}} $s]
vwait ::total
after cancel {set ::total timeout}
after cancel {set ::total done}
set ::total
} -cleanup {
close $srv
rename bgerror {}
rename zlibRead {}
} -result {error {invalid block type}}
|
| ︙ |
Changes to tools/genStubs.tcl.
| ︙ | |||
564 565 566 567 568 569 570 | 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | - - + + |
append lfname [string range $fname 1 end]
set text " "
if {$args eq ""} {
append text $rtype " *" $lfname "; /* $index */\n"
return $text
}
|
| ︙ |
Changes to win/configure.
| ︙ | |||
305 306 307 308 309 310 311 | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | - + | # include <stdint.h> # endif #endif #if HAVE_UNISTD_H # include <unistd.h> #endif" |
| ︙ | |||
1310 1311 1312 1313 1314 1315 1316 | 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 | - + - - | TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 TCL_PATCH_LEVEL="b2" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION |
| ︙ | |||
5251 5252 5253 5254 5255 5256 5257 | 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 | - - |
|
| ︙ | |||
5981 5982 5983 5984 5985 5986 5987 | 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 | - - | s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t s,@TCL_DDE_VERSION@,$TCL_DDE_VERSION,;t t s,@TCL_DDE_MAJOR_VERSION@,$TCL_DDE_MAJOR_VERSION,;t t s,@TCL_DDE_MINOR_VERSION@,$TCL_DDE_MINOR_VERSION,;t t |
| ︙ |
Changes to win/configure.in.
| ︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + - - | TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 TCL_PATCH_LEVEL="b2" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION |
| ︙ | |||
426 427 428 429 430 431 432 | 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | - - | AC_SUBST(TCL_LIB_VERSIONS_OK) AC_SUBST(TCL_PACKAGE_PATH) # win only AC_SUBST(TCL_DDE_VERSION) AC_SUBST(TCL_DDE_MAJOR_VERSION) AC_SUBST(TCL_DDE_MINOR_VERSION) |
| ︙ |
Changes to win/makefile.bc.
| ︙ | |||
122 123 124 125 126 127 128 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - - + + | ###################################################################### NAMEPREFIX = tcl STUBPREFIX = $(NAMEPREFIX)stub DOTVERSION = 8.6 VERSION = 86 |
| ︙ |
Changes to win/makefile.vc.
| ︙ | |||
182 183 184 185 186 187 188 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - + | PROJECT = tcl !include "rules.vc" STUBPREFIX = $(PROJECT)stub DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION) VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) |
| ︙ |
Changes to win/tclWinDde.c.
| ︙ | |||
769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 | 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 800 801 802 803 804 805 806 807 808 809 810 811 | + - - - + + + + + + + + + + + + + + + + |
case XTYP_EXECUTE: {
/*
* Execute this script. The results will be saved into a list object
* which will be retreived later. See ExecuteRemoteObject.
*/
Tcl_Obj *returnPackagePtr;
Tcl_UniChar *uniStr;
for (convPtr = tsdPtr->currentConversations; (convPtr != NULL)
&& (convPtr->hConv != hConv); convPtr = convPtr->nextPtr) {
/*
* Empty loop body.
*/
}
if (convPtr == NULL) {
return (HDDEDATA) DDE_FNOTPROCESSED;
}
|
| ︙ | |||
1383 1384 1385 1386 1387 1388 1389 | 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 | - + - + - - - + + + - + - - + + - + - + |
} else {
Tcl_ResetResult(interp);
}
break;
case DDE_EXECUTE: {
int dataLength;
|
| ︙ | |||
1457 1458 1459 1460 1461 1462 1463 | 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 | - + - + - + + + + + - + + |
result = TCL_ERROR;
} else {
Tcl_Obj *returnObjPtr;
ddeItem = DdeCreateStringHandle(ddeInstance, (void *) itemString,
CP_WINUNICODE);
if (ddeItem != NULL) {
ddeData = DdeClientTransaction(NULL, 0, hConv, ddeItem,
|
| ︙ | |||
1516 1517 1518 1519 1520 1521 1522 | 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 | - + |
SetDdeError(interp);
result = TCL_ERROR;
} else {
ddeItem = DdeCreateStringHandle(ddeInstance, (void *) itemString,
CP_WINUNICODE);
if (ddeItem != NULL) {
ddeData = DdeClientTransaction(dataString, (DWORD) length,
|
| ︙ | |||
1659 1660 1661 1662 1663 1664 1665 | 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 | - + - + - + - + - + + - - - - + + + + + |
Tcl_NewStringObj("invalid data returned from server", -1));
Tcl_SetErrorCode(interp, "TCL", "DDE", "BAD_RESPONSE", NULL);
result = TCL_ERROR;
goto cleanup;
}
objPtr = Tcl_ConcatObj(objc, objv);
|
| ︙ |