Index: generic/nsf.c =================================================================== diff -u -r4808f8e3f51917839c6708c4d0e5461a96b8bb70 -r286401d1ba226b1fa0b060c43d296f1bb56e1aa2 --- generic/nsf.c (.../nsf.c) (revision 4808f8e3f51917839c6708c4d0e5461a96b8bb70) +++ generic/nsf.c (.../nsf.c) (revision 286401d1ba226b1fa0b060c43d296f1bb56e1aa2) @@ -1375,11 +1375,11 @@ * *---------------------------------------------------------------------- */ -static Tcl_HashEntry * Nsf_NextHashEntry(Tcl_HashTable *tablePtr, size_t expected, Tcl_HashSearch *hSrchPtr) +static Tcl_HashEntry * Nsf_NextHashEntry(Tcl_HashTable *tablePtr, TCL_SIZE_T expected, Tcl_HashSearch *hSrchPtr) nonnull(1) nonnull(3); static Tcl_HashEntry * -Nsf_NextHashEntry(Tcl_HashTable *tablePtr, size_t expected, Tcl_HashSearch *hSrchPtr) { +Nsf_NextHashEntry(Tcl_HashTable *tablePtr, TCL_SIZE_T expected, Tcl_HashSearch *hSrchPtr) { Tcl_HashEntry *result; nonnull_assert(tablePtr != NULL); @@ -1875,7 +1875,7 @@ static char * DStringAppendQualName(Tcl_DString *dsPtr, const Tcl_Namespace *nsPtr, const char *name) { - size_t oldLength; + TCL_SIZE_T oldLength; nonnull_assert(dsPtr != NULL); nonnull_assert(nsPtr != NULL); @@ -2419,7 +2419,7 @@ void NewTclCommand(Tcl_Interp *interp, Tcl_DString *dsPtr) { - size_t prefixLength; + TCL_SIZE_T prefixLength; NsfStringIncrStruct *iss; nonnull_assert(interp != NULL); @@ -2431,7 +2431,7 @@ while (1) { (void)NsfStringIncr(iss); - Tcl_DStringAppend(dsPtr, iss->start, (unsigned long)iss->length); + Tcl_DStringAppend(dsPtr, iss->start, (TCL_SIZE_T)iss->length); if (!Tcl_FindCommand(interp, Tcl_DStringValue(dsPtr), NULL, TCL_GLOBAL_ONLY)) { break; } @@ -4928,10 +4928,10 @@ localCt = varFramePtr->numCompiledLocals; if (localCt > 0) { Tcl_Obj **varNameObjPtr; - size_t i, nameLength; + TCL_SIZE_T i, nameLength; varNameObjPtr = &varFramePtr->localCachePtr->varName0; - nameLength = strlen(varName); + nameLength = (TCL_SIZE_T)strlen(varName); /* fprintf(stderr, "=== compiled local search #local vars %d for <%s> flags %.8x\n", localCt, varName, varFramePtr->isProcCallFrame); @@ -4990,10 +4990,10 @@ CompiledColonLocalsLookupBuildCache(CallFrame *varFramePtr, const char *varName, TCL_SIZE_T nameLength, Tcl_Obj **localNames, NsfProcContext *ctxPtr) { - int nrColonVars = 0, j; - size_t localCt, i; - Tcl_Var result; - Tcl_Obj **varNameObjPtr; + int nrColonVars = 0, j; + TCL_SIZE_T localCt, i; + Tcl_Var result; + Tcl_Obj **varNameObjPtr; nonnull_assert(varFramePtr != NULL); nonnull_assert(varName != NULL); @@ -5708,13 +5708,13 @@ * *---------------------------------------------------------------------- */ -static int InterpCompiledColonVarResolver(Tcl_Interp *interp, const char *name, size_t length, +static int InterpCompiledColonVarResolver(Tcl_Interp *interp, const char *name, TCL_SIZE_T length, Tcl_Namespace *UNUSED(context), Tcl_ResolvedVarInfo **rPtr) nonnull(1) nonnull(2) nonnull(5); static int InterpCompiledColonVarResolver(Tcl_Interp *interp, - const char *name, size_t length, Tcl_Namespace *UNUSED(context), + const char *name, TCL_SIZE_T length, Tcl_Namespace *UNUSED(context), Tcl_ResolvedVarInfo **rPtr) { /* * The variable handler is registered, when we have an active Next @@ -6531,7 +6531,7 @@ Tcl_HashTable *cmdTablePtr = Tcl_Namespace_cmdTablePtr(nsPtr); Tcl_HashSearch hSrch; const Tcl_HashEntry *hPtr; - size_t expected; + TCL_SIZE_T expected; nonnull_assert(interp != NULL); nonnull_assert(nsPtr != NULL); @@ -13308,13 +13308,13 @@ *---------------------------------------------------------------------- */ static void ParamDefsFormatOption( - Tcl_Obj *nameStringObj, const char *option, size_t optionLength, + Tcl_Obj *nameStringObj, const char *option, TCL_SIZE_T optionLength, int *colonWritten, int *firstOption ) nonnull(1) nonnull(2) nonnull(4) nonnull(5); static void ParamDefsFormatOption( - Tcl_Obj *nameStringObj, const char *option, size_t optionLength, + Tcl_Obj *nameStringObj, const char *option, TCL_SIZE_T optionLength, int *colonWritten, int *firstOption ) { @@ -13438,7 +13438,7 @@ len ++; } buffer[len] = '\0'; - ParamDefsFormatOption(nameStringObj, buffer, len, &colonWritten, &first); + ParamDefsFormatOption(nameStringObj, buffer, (TCL_SIZE_T)len, &colonWritten, &first); } if ((paramsPtr->flags & NSF_ARG_ALLOW_EMPTY) != 0u || (paramsPtr->flags & NSF_ARG_MULTIVALUED) != 0u) { @@ -20484,8 +20484,8 @@ * ensemble, we have to insert the objs of the full ensemble name. */ if (inEnsemble) { - methodNameLength = 1 + (size_t)cscPtr->objc - oc; - nobjc = (TCL_SIZE_T)objc + methodNameLength; + methodNameLength = 1 + (size_t)cscPtr->objc - (size_t)oc; + nobjc = (TCL_SIZE_T)objc + (TCL_SIZE_T)methodNameLength; nobjv = (Tcl_Obj **)ckalloc((unsigned)sizeof(Tcl_Obj *) * (unsigned)nobjc); MEM_COUNT_ALLOC("nextArgumentVector", nobjv); /* @@ -20495,7 +20495,7 @@ } else { methodNameLength = 1; - nobjc = (TCL_SIZE_T)objc + methodNameLength; + nobjc = (TCL_SIZE_T)objc + (TCL_SIZE_T)methodNameLength; nobjv = (Tcl_Obj **)ckalloc((unsigned)sizeof(Tcl_Obj *) * (unsigned)nobjc); MEM_COUNT_ALLOC("nextArgumentVector", nobjv); /* @@ -26755,7 +26755,7 @@ return TCL_OK; } else { - size_t prefixLength = (prefix != NULL) ? Tcl_DStringLength(prefix) : 0; + size_t prefixLength = (prefix != NULL) ? (size_t)Tcl_DStringLength(prefix) : 0u; /* * We have to iterate over the elements. Index: generic/nsfStack.c =================================================================== diff -u -re48161ab167236344f7d23da3e855c31d1a1ebc7 -r286401d1ba226b1fa0b060c43d296f1bb56e1aa2 --- generic/nsfStack.c (.../nsfStack.c) (revision e48161ab167236344f7d23da3e855c31d1a1ebc7) +++ generic/nsfStack.c (.../nsfStack.c) (revision 286401d1ba226b1fa0b060c43d296f1bb56e1aa2) @@ -273,8 +273,8 @@ Tcl_CallFrame_clientData(framePtr), (unsigned long)Tcl_CallFrame_level(framePtr), (void *)Tcl_CallFrame_nsPtr(framePtr), Tcl_CallFrame_nsPtr(framePtr)->fullName, - Tcl_CallFrame_objc(framePtr) > 0u ? ObjStr(Tcl_CallFrame_objv(framePtr)[0]) : "(null)", - Tcl_CallFrame_objc(framePtr) > 0u ? (unsigned long)Tcl_CallFrame_objc(framePtr) : 0u); + Tcl_CallFrame_objc(framePtr) > 0 ? ObjStr(Tcl_CallFrame_objv(framePtr)[0]) : "(null)", + Tcl_CallFrame_objc(framePtr) > 0 ? (unsigned long)Tcl_CallFrame_objc(framePtr) : 0u); if (cscPtr != NULL) { fprintf(stderr, " csc %p frameType %.4x flags %.6x (%s.%p %s)\n", (void *)cscPtr, @@ -658,7 +658,7 @@ varFramePtr = (Tcl_CallFrame *)Tcl_Interp_varFramePtr(interp); if (likely(varFramePtr != NULL)) { - unsigned long lvl = Tcl_CallFrame_level(varFramePtr); + TCL_SIZE_T lvl = Tcl_CallFrame_level(varFramePtr); do { register unsigned int flags = (unsigned int)Tcl_CallFrame_isProcCallFrame(varFramePtr);