diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-28 15:58:49 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-28 15:58:49 (GMT) |
| commit | dabfa1a0534f5b346196d940549d2f5bb859c7dd (patch) | |
| tree | 626312fc576101d24815a19d54da3754a2cf0a37 | |
| parent | 82fb7b1d551b7e74efa4ee9cc814ef74fab5332c (diff) | |
| parent | 8f6442b0c910bb7b7431c390a2dbb92985d83162 (diff) | |
| download | tcl-dabfa1a0534f5b346196d940549d2f5bb859c7dd.zip tcl-dabfa1a0534f5b346196d940549d2f5bb859c7dd.tar.gz tcl-dabfa1a0534f5b346196d940549d2f5bb859c7dd.tar.bz2 | |
Merge 9.0. New macro ABSTRACTLIST_PROC
| -rw-r--r-- | generic/tcl.decls | 17 | ||||
| -rwxr-xr-x | generic/tclArithSeries.c | 24 | ||||
| -rw-r--r-- | generic/tclArithSeries.h | 14 | ||||
| -rw-r--r-- | generic/tclDecls.h | 28 | ||||
| -rw-r--r-- | generic/tclInt.decls | 2 | ||||
| -rw-r--r-- | generic/tclInt.h | 12 | ||||
| -rw-r--r-- | generic/tclIntDecls.h | 6 | ||||
| -rw-r--r-- | generic/tclListObj.c | 34 | ||||
| -rw-r--r-- | generic/tclObj.c | 16 | ||||
| -rw-r--r-- | generic/tclPkg.c | 4 | ||||
| -rw-r--r-- | generic/tclStubInit.c | 9 | ||||
| -rw-r--r-- | generic/tclTest.c | 20 | ||||
| -rw-r--r-- | generic/tclUtil.c | 4 |
13 files changed, 104 insertions, 86 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index d07b269..2a35559 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2611,27 +2611,23 @@ declare 683 { int Tcl_GetEncodingNulLength(Tcl_Encoding encoding) } -# TIP #648 (reserved) -#declare 684 { -# Tcl_Obj *Tcl_NewWideUIntObj(Tcl_WideUInt wideValue) -#} -#declare 685 { -# void Tcl_SetWideUIntObj(Tcl_Obj *objPtr, Tcl_WideUInt uwideValue) -#} - # TIP #650 -declare 686 { +declare 684 { int Tcl_GetWideUIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr) } # TIP 651 -declare 687 { +declare 685 { Tcl_Obj *Tcl_DStringToObj(Tcl_DString *dsPtr) } # ----- BASELINE -- FOR -- 8.7.0 / 9.0.0 ----- # +declare 687 { + void TclUnusedStubEntry(void) +} + ############################################################################## # Define the platform specific public Tcl interface. These functions are only @@ -2704,6 +2700,7 @@ export { const char *TclZipfs_AppHook(int *argc, char ***argv) } + # Local Variables: # mode: tcl # End: diff --git a/generic/tclArithSeries.c b/generic/tclArithSeries.c index 1d6291d..632d812 100755 --- a/generic/tclArithSeries.c +++ b/generic/tclArithSeries.c @@ -77,8 +77,8 @@ const TclObjTypeWithAbstractList tclArithSeriesType = { UpdateStringOfArithSeries, /* updateStringProc */ SetArithSeriesFromAny, /* setFromAnyProc */ TCL_OBJTYPE_V0_1( - TclArithSeriesObjLength - ) + TclArithSeriesObjLength + )} }; /* @@ -433,7 +433,7 @@ TclArithSeriesObjIndex(Tcl_Obj *arithSeriesPtr, Tcl_WideInt index, Tcl_Obj **ele Tcl_Panic("TclArithSeriesObjIndex called with a not ArithSeries Obj."); } arithSeriesRepPtr = ArithSeriesRepPtr(arithSeriesPtr); - if ((unsigned long long)index >= arithSeriesRepPtr->len) { + if (index < 0 || (Tcl_Size)index >= arithSeriesRepPtr->len) { return TCL_ERROR; } /* List[i] = Start + (Step * index) */ @@ -462,7 +462,7 @@ TclArithSeriesObjIndex(Tcl_Obj *arithSeriesPtr, Tcl_WideInt index, Tcl_Obj **ele * *---------------------------------------------------------------------- */ -size_t TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr) +Tcl_Size TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr) { ArithSeries *arithSeriesRepPtr = (ArithSeries*) arithSeriesPtr->internalRep.twoPtrValue.ptr1; @@ -493,7 +493,7 @@ FreeArithSeriesInternalRep(Tcl_Obj *arithSeriesPtr) ArithSeries *arithSeriesRepPtr = (ArithSeries *) arithSeriesPtr->internalRep.twoPtrValue.ptr1; if (arithSeriesRepPtr->elements) { - unsigned long long i; + Tcl_Size i; Tcl_Obj**elmts = arithSeriesRepPtr->elements; for(i=0; i<arithSeriesRepPtr->len; i++) { if (elmts[i]) { @@ -578,7 +578,7 @@ UpdateStringOfArithSeries(Tcl_Obj *arithSeriesPtr) (ArithSeries*) arithSeriesPtr->internalRep.twoPtrValue.ptr1; char *elem, *p; Tcl_Obj *elemObj; - unsigned long long i; + Tcl_Size i; Tcl_WideInt length = 0; size_t slen; @@ -732,7 +732,7 @@ TclArithSeriesObjRange( Tcl_SetObjResult( interp, Tcl_ObjPrintf("index %" TCL_Z_MODIFIER "u is out of bounds 0 to %" - TCL_LL_MODIFIER "d", fromIdx, (arithSeriesRepPtr->len-1))); + TCL_Z_MODIFIER "u", fromIdx, (arithSeriesRepPtr->len-1))); Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); } return NULL; @@ -743,7 +743,7 @@ TclArithSeriesObjRange( Tcl_SetObjResult( interp, Tcl_ObjPrintf("index %" TCL_Z_MODIFIER "u is out of bounds 0 to %" - TCL_LL_MODIFIER "d", fromIdx, (arithSeriesRepPtr->len-1))); + TCL_Z_MODIFIER "d", fromIdx, (arithSeriesRepPtr->len-1))); Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); } return NULL; @@ -1004,3 +1004,11 @@ TclArithSeriesObjReverse( return resultObj; } + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclArithSeries.h b/generic/tclArithSeries.h index ccd050f..28fd993 100644 --- a/generic/tclArithSeries.h +++ b/generic/tclArithSeries.h @@ -16,7 +16,7 @@ * but it's faster to cache it inside the internal representation. */ typedef struct { - unsigned long long len; + Tcl_Size len; Tcl_Obj **elements; int isDouble; Tcl_WideInt start; @@ -24,7 +24,7 @@ typedef struct { Tcl_WideInt step; } ArithSeries; typedef struct { - unsigned long long len; + Tcl_Size len; Tcl_Obj **elements; int isDouble; double start; @@ -39,7 +39,7 @@ MODULE_SCOPE int TclArithSeriesObjStep(Tcl_Obj *arithSeriesPtr, Tcl_Obj **stepObj); MODULE_SCOPE int TclArithSeriesObjIndex(Tcl_Obj *arithSeriesPtr, Tcl_WideInt index, Tcl_Obj **elementObj); -MODULE_SCOPE size_t TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr); +MODULE_SCOPE Tcl_Size TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr); MODULE_SCOPE Tcl_Obj * TclArithSeriesObjRange(Tcl_Interp *interp, Tcl_Obj *arithSeriesPtr, Tcl_Size fromIdx, Tcl_Size toIdx); MODULE_SCOPE Tcl_Obj * TclArithSeriesObjReverse(Tcl_Interp *interp, @@ -55,3 +55,11 @@ MODULE_SCOPE int TclNewArithSeriesObj(Tcl_Interp *interp, Tcl_Obj **arithSeriesObj, int useDoubles, Tcl_Obj *startObj, Tcl_Obj *endObj, Tcl_Obj *stepObj, Tcl_Obj *lenObj); + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 0bbf665..d5eaf6d 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1852,13 +1852,14 @@ EXTERN int Tcl_RemoveChannelMode(Tcl_Interp *interp, Tcl_Channel chan, int mode); /* 683 */ EXTERN int Tcl_GetEncodingNulLength(Tcl_Encoding encoding); -/* Slot 684 is reserved */ -/* Slot 685 is reserved */ -/* 686 */ +/* 684 */ EXTERN int Tcl_GetWideUIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); -/* 687 */ +/* 685 */ EXTERN Tcl_Obj * Tcl_DStringToObj(Tcl_DString *dsPtr); +/* Slot 686 is reserved */ +/* 687 */ +EXTERN void TclUnusedStubEntry(void); typedef struct { const struct TclPlatStubs *tclPlatStubs; @@ -2554,10 +2555,10 @@ typedef struct TclStubs { int (*tcl_GetNumber) (Tcl_Interp *interp, const char *bytes, size_t numBytes, void **clientDataPtr, int *typePtr); /* 681 */ int (*tcl_RemoveChannelMode) (Tcl_Interp *interp, Tcl_Channel chan, int mode); /* 682 */ int (*tcl_GetEncodingNulLength) (Tcl_Encoding encoding); /* 683 */ - void (*reserved684)(void); - void (*reserved685)(void); - int (*tcl_GetWideUIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 686 */ - Tcl_Obj * (*tcl_DStringToObj) (Tcl_DString *dsPtr); /* 687 */ + int (*tcl_GetWideUIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 684 */ + Tcl_Obj * (*tcl_DStringToObj) (Tcl_DString *dsPtr); /* 685 */ + void (*reserved686)(void); + void (*tclUnusedStubEntry) (void); /* 687 */ } TclStubs; extern const TclStubs *tclStubsPtr; @@ -3878,17 +3879,20 @@ extern const TclStubs *tclStubsPtr; (tclStubsPtr->tcl_RemoveChannelMode) /* 682 */ #define Tcl_GetEncodingNulLength \ (tclStubsPtr->tcl_GetEncodingNulLength) /* 683 */ -/* Slot 684 is reserved */ -/* Slot 685 is reserved */ #define Tcl_GetWideUIntFromObj \ - (tclStubsPtr->tcl_GetWideUIntFromObj) /* 686 */ + (tclStubsPtr->tcl_GetWideUIntFromObj) /* 684 */ #define Tcl_DStringToObj \ - (tclStubsPtr->tcl_DStringToObj) /* 687 */ + (tclStubsPtr->tcl_DStringToObj) /* 685 */ +/* Slot 686 is reserved */ +#define TclUnusedStubEntry \ + (tclStubsPtr->tclUnusedStubEntry) /* 687 */ #endif /* defined(USE_TCL_STUBS) */ /* !END!: Do not edit above this line. */ +#undef TclUnusedStubEntry + #ifdef _WIN32 # undef Tcl_CreateFileHandler # undef Tcl_DeleteFileHandler diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 0c88b87..10cfbf6 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -706,7 +706,7 @@ declare 258 { # TIP 625: for unit testing - create list objects with span declare 260 { - Tcl_Obj *TclListTestObj(Tcl_Size length, Tcl_Size leadingSpace, Tcl_Size endSpace) + Tcl_Obj *TclListTestObj(size_t length, size_t leadingSpace, size_t endSpace) } # TIP 625: for unit testing - check list invariants diff --git a/generic/tclInt.h b/generic/tclInt.h index b5fc48e..392ccab 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -1093,13 +1093,15 @@ typedef struct ActiveInterpTrace { typedef struct { /* For internal core use only */ Tcl_ObjType objType; - size_t (*lengthProc)(Tcl_Obj *obj); + struct { + size_t (*lengthProc)(Tcl_Obj *obj); + } abstractList; } TclObjTypeWithAbstractList; #define TCL_OBJTYPE_V0_1(lengthProc) (sizeof(TclObjTypeWithAbstractList)) \ - }, lengthProc /* For internal core use only */ -#define HAS_ABSTRACTLIST_PROC(objPtr, proc) (objPtr->typePtr \ - && (objPtr->typePtr->version > offsetof(TclObjTypeWithAbstractList, proc)) \ - && (((const TclObjTypeWithAbstractList *)objPtr->typePtr)->proc)) + }, {lengthProc /* For internal core use only */ +#define ABSTRACTLIST_PROC(objPtr, proc) (((objPtr)->typePtr \ + && ((objPtr)->typePtr->version > offsetof(TclObjTypeWithAbstractList, abstractList.proc))) ? \ + ((const TclObjTypeWithAbstractList *)(objPtr)->typePtr)->abstractList.proc : NULL) /* * The structure below defines an entry in the assocData hash table which is diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 128e3c9..d6168b5 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -578,8 +578,8 @@ EXTERN Tcl_Obj * TclpCreateTemporaryDirectory(Tcl_Obj *dirObj, Tcl_Obj *basenameObj); /* Slot 259 is reserved */ /* 260 */ -EXTERN Tcl_Obj * TclListTestObj(Tcl_Size length, - Tcl_Size leadingSpace, Tcl_Size endSpace); +EXTERN Tcl_Obj * TclListTestObj(size_t length, size_t leadingSpace, + size_t endSpace); /* 261 */ EXTERN void TclListObjValidate(Tcl_Interp *interp, Tcl_Obj *listObj); @@ -848,7 +848,7 @@ typedef struct TclIntStubs { void (*tclStaticLibrary) (Tcl_Interp *interp, const char *prefix, Tcl_LibraryInitProc *initProc, Tcl_LibraryInitProc *safeInitProc); /* 257 */ Tcl_Obj * (*tclpCreateTemporaryDirectory) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj); /* 258 */ void (*reserved259)(void); - Tcl_Obj * (*tclListTestObj) (Tcl_Size length, Tcl_Size leadingSpace, Tcl_Size endSpace); /* 260 */ + Tcl_Obj * (*tclListTestObj) (size_t length, size_t leadingSpace, size_t endSpace); /* 260 */ void (*tclListObjValidate) (Tcl_Interp *interp, Tcl_Obj *listObj); /* 261 */ } TclIntStubs; diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 58322c5..e29c307 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -159,8 +159,8 @@ const TclObjTypeWithAbstractList tclListType = { UpdateStringOfList, /* updateStringProc */ SetListFromAny, /* setFromAnyProc */ TCL_OBJTYPE_V0_1( - ListLength - ) + ListLength + )} }; /* Macros to manipulate the List internal rep */ @@ -1993,18 +1993,13 @@ int Tcl_ListObjLength( Tcl_Interp *interp, /* Used to report errors if not NULL. */ Tcl_Obj *listObj, /* List object whose #elements to return. */ - Tcl_Size *lenPtr) /* The resulting int is stored here. */ + Tcl_Size *lenPtr) /* The resulting length is stored here. */ { - if (HAS_ABSTRACTLIST_PROC(listObj, lengthProc)) { - const TclObjTypeWithAbstractList *objType = (const TclObjTypeWithAbstractList *)listObj->typePtr; - unsigned long long len = objType->lengthProc(listObj); - if (len >= TCL_INDEX_NONE) { - if (interp) { - Tcl_AppendResult(interp, "List too large"); - } - return TCL_ERROR; - } - *lenPtr = len; + ListRep listRep; + + size_t (*lengthProc)(Tcl_Obj *obj) = ABSTRACTLIST_PROC(listObj, lengthProc); + if (lengthProc) { + *lenPtr = lengthProc(listObj); return TCL_OK; } @@ -2015,8 +2010,6 @@ Tcl_ListObjLength( * other hand, this code will be faster for the case where the object * is currently a dict. Benchmark the two cases. */ - ListRep listRep; - if (TclListObjGetRep(interp, listObj, &listRep) != TCL_OK) { return TCL_ERROR; } @@ -2648,7 +2641,7 @@ TclLindexFlat( /* Handle ArithSeries as special case */ if (TclHasInternalRep(listObj,&tclArithSeriesType.objType)) { - size_t listLen = TclArithSeriesObjLength(listObj); + Tcl_Size listLen = TclArithSeriesObjLength(listObj); Tcl_Size index; Tcl_Obj *elemObj = NULL; for (i=0 ; i<indexCount && listObj ; i++) { @@ -3528,10 +3521,10 @@ UpdateStringOfList( *------------------------------------------------------------------------ */ Tcl_Obj * -TclListTestObj(Tcl_Size length, Tcl_Size leadingSpace, Tcl_Size endSpace) +TclListTestObj(size_t length, size_t leadingSpace, size_t endSpace) { ListRep listRep; - Tcl_Size capacity; + size_t capacity; Tcl_Obj *listObj; TclNewObj(listObj); @@ -3541,11 +3534,14 @@ TclListTestObj(Tcl_Size length, Tcl_Size leadingSpace, Tcl_Size endSpace) if (capacity == 0) { return listObj; } + if (capacity > LIST_MAX) { + return NULL; + } ListRepInit(capacity, NULL, 0, &listRep); ListStore *storePtr = listRep.storePtr; - Tcl_Size i; + size_t i; for (i = 0; i < length; ++i) { TclNewUIntObj(storePtr->slots[i + leadingSpace], i); Tcl_IncrRefCount(storePtr->slots[i + leadingSpace]); diff --git a/generic/tclObj.c b/generic/tclObj.c index e4caf3e..67b7487 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -234,8 +234,8 @@ const TclObjTypeWithAbstractList tclBooleanType= { NULL, /* updateStringProc */ TclSetBooleanFromAny, /* setFromAnyProc */ TCL_OBJTYPE_V0_1( - LengthOne - ) + LengthOne + )} }; const TclObjTypeWithAbstractList tclDoubleType= { {"double", /* name */ @@ -244,8 +244,8 @@ const TclObjTypeWithAbstractList tclDoubleType= { UpdateStringOfDouble, /* updateStringProc */ SetDoubleFromAny, /* setFromAnyProc */ TCL_OBJTYPE_V0_1( - LengthOne - ) + LengthOne + )} }; const TclObjTypeWithAbstractList tclIntType = { {"int", /* name */ @@ -254,8 +254,8 @@ const TclObjTypeWithAbstractList tclIntType = { UpdateStringOfInt, /* updateStringProc */ SetIntFromAny, /* setFromAnyProc */ TCL_OBJTYPE_V0_1( - LengthOne - ) + LengthOne + )} }; const TclObjTypeWithAbstractList tclBignumType = { {"bignum", /* name */ @@ -264,8 +264,8 @@ const TclObjTypeWithAbstractList tclBignumType = { UpdateStringOfBignum, /* updateStringProc */ NULL, /* setFromAnyProc */ TCL_OBJTYPE_V0_1( - LengthOne - ) + LengthOne + )} }; /* diff --git a/generic/tclPkg.c b/generic/tclPkg.c index c439a36..34346f9 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -399,7 +399,7 @@ Tcl_PkgRequireEx( if (version == NULL) { if (Tcl_PkgRequireProc(interp, name, 0, NULL, clientDataPtr) == TCL_OK) { - result = Tcl_GetString(Tcl_GetObjResult(interp)); + result = Tcl_GetStringResult(interp); Tcl_ResetResult(interp); } } else { @@ -413,7 +413,7 @@ Tcl_PkgRequireEx( } Tcl_IncrRefCount(ov); if (Tcl_PkgRequireProc(interp, name, 1, &ov, clientDataPtr) == TCL_OK) { - result = Tcl_GetString(Tcl_GetObjResult(interp)); + result = Tcl_GetStringResult(interp); Tcl_ResetResult(interp); } TclDecrRefCount(ov); diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 8481998..1186aa3 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -85,6 +85,7 @@ #define TclGetByteArrayFromObj 0 #undef Tcl_GetByteArrayFromObj #define Tcl_GetByteArrayFromObj 0 +#define TclUnusedStubEntry 0 #if TCL_UTF_MAX < 4 @@ -1489,10 +1490,10 @@ const TclStubs tclStubs = { Tcl_GetNumber, /* 681 */ Tcl_RemoveChannelMode, /* 682 */ Tcl_GetEncodingNulLength, /* 683 */ - 0, /* 684 */ - 0, /* 685 */ - Tcl_GetWideUIntFromObj, /* 686 */ - Tcl_DStringToObj, /* 687 */ + Tcl_GetWideUIntFromObj, /* 684 */ + Tcl_DStringToObj, /* 685 */ + 0, /* 686 */ + TclUnusedStubEntry, /* 687 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/tclTest.c b/generic/tclTest.c index b526c0c..d8f004a 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -491,9 +491,6 @@ static const char version[] = TCL_PATCH_LEVEL "+" STRINGIFY(TCL_VERSION_UUID) #ifdef USE_NMAKE ".nmake" #endif -#ifdef TCL_NO_DEPRECATED - ".no-deprecate" -#endif #if !TCL_THREADS ".no-thread" #endif @@ -527,7 +524,7 @@ Tcltest_Init( Tcl_CmdInfo info; Tcl_Obj **objv, *objPtr; Tcl_Size objc; - int index; + int index; static const char *const specialOptions[] = { "-appinitprocerror", "-appinitprocdeleteinterp", "-appinitprocclosestderr", "-appinitprocsetrcfile", NULL @@ -1967,7 +1964,7 @@ TestencodingObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Encoding encoding; - int length; + size_t length; const char *string; TclEncoding *encodingPtr; static const char *const optionStrings[] = { @@ -3534,6 +3531,10 @@ TestlistrepCmd( } } resultObj = TclListTestObj(length, leadSpace, endSpace); + if (resultObj == NULL) { + Tcl_AppendResult(interp, "List capacity exceeded", NULL); + return TCL_ERROR; + } } break; @@ -4220,7 +4221,7 @@ TestregexpObjCmd( varName = Tcl_GetString(objv[2]); TclRegExpRangeUniChar(regExpr, TCL_INDEX_NONE, &start, &end); - sprintf(resinfo, "%" TCL_Z_MODIFIER "d %" TCL_Z_MODIFIER "d", start, (end-1)); + sprintf(resinfo, "%" TCL_Z_MODIFIER "d %" TCL_Z_MODIFIER "d", start, end-1); value = Tcl_SetVar2(interp, varName, NULL, resinfo, 0); if (value == NULL) { Tcl_AppendResult(interp, "couldn't set variable \"", @@ -7038,7 +7039,7 @@ SimpleMatchInDirectory( origPtr = SimpleRedirect(dirPtr); res = Tcl_FSMatchInDirectory(interp, resPtr, origPtr, pattern, types); if (res == TCL_OK) { - int gLength, j; + size_t gLength, j; Tcl_ListObjLength(NULL, resPtr, &gLength); for (j = 0; j < gLength; j++) { Tcl_Obj *gElt, *nElt; @@ -7602,7 +7603,8 @@ TestconcatobjCmd( TCL_UNUSED(const char **) /*argv*/) { Tcl_Obj *list1Ptr, *list2Ptr, *emptyPtr, *concatPtr, *tmpPtr; - int result = TCL_OK, len; + int result = TCL_OK; + size_t len; Tcl_Obj *objv[3]; /* @@ -7959,7 +7961,7 @@ TestparseargsCmd( Tcl_Obj *const objv[]) /* Arguments. */ { static int foo = 0; - int count = objc; + size_t count = objc; Tcl_Obj **remObjv, *result[3]; Tcl_ArgvInfo argTable[] = { {TCL_ARGV_CONSTANT, "-bool", INT2PTR(1), &foo, "booltest", NULL}, diff --git a/generic/tclUtil.c b/generic/tclUtil.c index a0a866b..a53ca28 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -131,8 +131,8 @@ static const TclObjTypeWithAbstractList endOffsetType = { NULL, /* updateStringProc */ NULL, /* setFromAnyProc */ TCL_OBJTYPE_V0_1( - LengthOne - ) + LengthOne + )} }; /* |
