diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-06-28 20:30:24 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-06-28 20:30:24 (GMT) |
commit | 94780336613da72b26e6572a616a2dfe9f087eca (patch) | |
tree | a319eb4e63e22b6af52e7c7a3bc06aa5b5160e0a | |
parent | 66ec3cd3a668d06b78e321578eb5f3fa1cda5031 (diff) | |
download | tcl-94780336613da72b26e6572a616a2dfe9f087eca.zip tcl-94780336613da72b26e6572a616a2dfe9f087eca.tar.gz tcl-94780336613da72b26e6572a616a2dfe9f087eca.tar.bz2 |
More using TCL_Z_MODIFIER where possible
-rw-r--r-- | generic/tclAssembly.c | 2 | ||||
-rw-r--r-- | generic/tclBinary.c | 6 | ||||
-rw-r--r-- | generic/tclCkalloc.c | 26 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 50 | ||||
-rw-r--r-- | generic/tclDisassemble.c | 11 | ||||
-rw-r--r-- | generic/tclExecute.c | 36 | ||||
-rw-r--r-- | generic/tclLiteral.c | 12 | ||||
-rw-r--r-- | generic/tclOO.c | 2 | ||||
-rw-r--r-- | generic/tclObj.c | 4 | ||||
-rw-r--r-- | generic/tclStringObj.c | 4 | ||||
-rw-r--r-- | generic/tclStringRep.h | 4 |
11 files changed, 78 insertions, 79 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 688ed2d..475799b 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -2259,7 +2259,7 @@ GetListIndexOperand( * when list size limits grow. */ status = TclIndexEncode(interp, value, - TCL_INDEX_BEFORE,TCL_INDEX_BEFORE, result); + TCL_INDEX_BEFORE,INT_MAX, result); Tcl_DecrRefCount(value); *tokenPtrPtr = TokenAfter(tokenPtr); diff --git a/generic/tclBinary.c b/generic/tclBinary.c index a34bd27..1b67bb9 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -2513,7 +2513,7 @@ BinaryDecodeHex( badChar: TclDecrRefCount(resultObj); Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "invalid hexadecimal digit \"%c\" at position %" TCL_Z_MODIFIER "d", + "invalid hexadecimal digit \"%c\" at position %" TCL_Z_MODIFIER "u", c, data - datastart - 1)); return TCL_ERROR; } @@ -2915,7 +2915,7 @@ BinaryDecodeUu( badUu: Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "invalid uuencode character \"%c\" at position %" TCL_Z_MODIFIER "d", + "invalid uuencode character \"%c\" at position %" TCL_Z_MODIFIER "u", c, data - datastart - 1)); Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", NULL); TclDecrRefCount(resultObj); @@ -3065,7 +3065,7 @@ BinaryDecode64( bad64: Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "invalid base64 character \"%c\" at position %" TCL_Z_MODIFIER "d", + "invalid base64 character \"%c\" at position %" TCL_Z_MODIFIER "u", (char) c, data - datastart - 1)); TclDecrRefCount(resultObj); return TCL_ERROR; diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 35e868e..63721e5 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -243,7 +243,7 @@ ValidateMemory( guard_failed = TRUE; fflush(stdout); byte &= 0xff; - fprintf(stderr, "low guard byte %zu is 0x%x \t%c\n", idx, byte, + fprintf(stderr, "low guard byte %" TCL_Z_MODIFIER "u is 0x%x \t%c\n", idx, byte, (isprint(UCHAR(byte)) ? byte : ' ')); /* INTL: bytes */ } } @@ -264,7 +264,7 @@ ValidateMemory( guard_failed = TRUE; fflush(stdout); byte &= 0xff; - fprintf(stderr, "hi guard byte %zu is 0x%x \t%c\n", idx, byte, + fprintf(stderr, "hi guard byte %" TCL_Z_MODIFIER "u is 0x%x \t%c\n", idx, byte, (isprint(UCHAR(byte)) ? byte : ' ')); /* INTL: bytes */ } } @@ -409,7 +409,7 @@ Tcl_DbCkalloc( if (result == NULL) { fflush(stdout); TclDumpMemoryInfo((ClientData) stderr, 0); - Tcl_Panic("unable to alloc %" TCL_LL_MODIFIER "d bytes, %s line %d", (Tcl_WideInt)size, file, line); + Tcl_Panic("unable to alloc %" TCL_Z_MODIFIER "u bytes, %s line %d", size, file, line); } /* @@ -455,8 +455,8 @@ Tcl_DbCkalloc( } if (alloc_tracing) { - fprintf(stderr,"ckalloc %p %" TCL_LL_MODIFIER "d %s %d\n", - result->body, (Tcl_WideInt)size, file, line); + fprintf(stderr,"ckalloc %p %" TCL_Z_MODIFIER "u %s %d\n", + result->body, size, file, line); } if (break_on_malloc && (total_mallocs >= break_on_malloc)) { @@ -544,8 +544,8 @@ Tcl_AttemptDbCkalloc( } if (alloc_tracing) { - fprintf(stderr,"ckalloc %p %" TCL_LL_MODIFIER "d %s %d\n", - result->body, (Tcl_WideInt)size, file, line); + fprintf(stderr,"ckalloc %p %" TCL_Z_MODIFIER "u %s %d\n", + result->body, size, file, line); } if (break_on_malloc && (total_mallocs >= break_on_malloc)) { @@ -1017,7 +1017,7 @@ Tcl_Alloc( */ if ((result == NULL) && size) { - Tcl_Panic("unable to alloc %" TCL_LL_MODIFIER "u bytes", (Tcl_WideInt)size); + Tcl_Panic("unable to alloc %" TCL_Z_MODIFIER "u bytes", size); } return result; } @@ -1034,8 +1034,8 @@ Tcl_DbCkalloc( if ((result == NULL) && size) { fflush(stdout); - Tcl_Panic("unable to alloc %" TCL_LL_MODIFIER "u bytes, %s line %d", - (Tcl_WideInt)size, file, line); + Tcl_Panic("unable to alloc %" TCL_Z_MODIFIER "u bytes, %s line %d", + size, file, line); } return result; } @@ -1095,7 +1095,7 @@ Tcl_Realloc( result = TclpRealloc(ptr, size); if ((result == NULL) && size) { - Tcl_Panic("unable to realloc %" TCL_LL_MODIFIER "u bytes", (Tcl_WideInt)size); + Tcl_Panic("unable to realloc %" TCL_Z_MODIFIER "u bytes", size); } return result; } @@ -1113,8 +1113,8 @@ Tcl_DbCkrealloc( if ((result == NULL) && size) { fflush(stdout); - Tcl_Panic("unable to realloc %" TCL_LL_MODIFIER "u bytes, %s line %d", - (Tcl_WideInt)size, file, line); + Tcl_Panic("unable to realloc %" TCL_Z_MODIFIER "u bytes, %s line %d", + size, file, line); } return result; } diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index b624bc0..8d75b18 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -335,7 +335,7 @@ Tcl_RegexpObjCmd( */ if (!doinline) { - Tcl_SetObjResult(interp, Tcl_NewLongObj(0)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); } return TCL_OK; } @@ -457,7 +457,7 @@ Tcl_RegexpObjCmd( if (doinline) { Tcl_SetObjResult(interp, resultPtr); } else { - Tcl_SetObjResult(interp, Tcl_NewLongObj(all ? all-1 : 1)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(all ? all-1 : 1)); } return TCL_OK; } @@ -959,7 +959,7 @@ Tcl_RegsubObjCmd( * holding the number of matches. */ - Tcl_SetObjResult(interp, Tcl_NewLongObj(numMatches)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(numMatches)); } } else { /* @@ -1118,8 +1118,8 @@ TclNRSourceObjCmd( }; int index; - if (TCL_ERROR == Tcl_GetIndexFromObjStruct(interp, objv[1], options, - sizeof(char *), "option", TCL_EXACT, &index)) { + if (TCL_ERROR == Tcl_GetIndexFromObj(interp, objv[1], options, + "option", TCL_EXACT, &index)) { return TCL_ERROR; } encodingName = TclGetString(objv[2]); @@ -1516,8 +1516,8 @@ StringIsCmd( "class ?-strict? ?-failindex var? str"); return TCL_ERROR; } - if (Tcl_GetIndexFromObjStruct(interp, objv[1], isClasses, - sizeof(char *), "class", 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[1], isClasses, "class", 0, + &index) != TCL_OK) { return TCL_ERROR; } @@ -1525,8 +1525,8 @@ StringIsCmd( for (i = 2; i < objc-1; i++) { int idx2; - if (Tcl_GetIndexFromObjStruct(interp, objv[i], isOptions, - sizeof(char *), "option", 0, &idx2) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], isOptions, "option", 0, + &idx2) != TCL_OK) { return TCL_ERROR; } switch ((enum isOptions) idx2) { @@ -1829,11 +1829,11 @@ StringIsCmd( str_is_done: if ((result == 0) && (failVarObj != NULL) && - Tcl_ObjSetVar2(interp, failVarObj, NULL, Tcl_NewLongObj(failat), + Tcl_ObjSetVar2(interp, failVarObj, NULL, Tcl_NewIntObj(failat), TCL_LEAVE_ERR_MSG) == NULL) { return TCL_ERROR; } - Tcl_SetObjResult(interp, Tcl_NewLongObj(result!=0)); + Tcl_SetObjResult(interp, Tcl_NewBooleanObj(result)); return TCL_OK; } @@ -2021,7 +2021,7 @@ StringMapCmd( if (((*ustring1 == *ustring2) || (nocase&&Tcl_UniCharToLower(*ustring1)==u2lc)) && (length2==1 || strCmpFn(ustring1, ustring2, - (size_t) length2) == 0)) { + length2) == 0)) { if (p != ustring1) { Tcl_AppendUnicodeToObj(resultPtr, p, ustring1-p); p = ustring1 + length2; @@ -2069,7 +2069,7 @@ StringMapCmd( (Tcl_UniCharToLower(*ustring1) == u2lc[index/2]))) && /* Restrict max compare length. */ (end-ustring1 >= length2) && ((length2 == 1) || - !strCmpFn(ustring2, ustring1, (size_t) length2))) { + !strCmpFn(ustring2, ustring1, length2))) { if (p != ustring1) { /* * Put the skipped chars onto the result first. @@ -2168,8 +2168,8 @@ StringMatchCmd( return TCL_ERROR; } } - Tcl_SetObjResult(interp, Tcl_NewLongObj( - TclStringMatchObj(objv[objc-1], objv[objc-2], nocase)!=0)); + Tcl_SetObjResult(interp, Tcl_NewBooleanObj( + TclStringMatchObj(objv[objc-1], objv[objc-2], nocase))); return TCL_OK; } @@ -2451,7 +2451,7 @@ StringStartCmd( cur += 1; } } - Tcl_SetObjResult(interp, Tcl_NewLongObj(cur)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(cur)); return TCL_OK; } @@ -2513,7 +2513,7 @@ StringEndCmd( } else { cur = numChars; } - Tcl_SetObjResult(interp, Tcl_NewLongObj(cur)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(cur)); return TCL_OK; } @@ -2590,7 +2590,7 @@ StringEqualCmd( match = TclStringCmp(objv[0], objv[1], 0, nocase, reqlength); - Tcl_SetObjResult(interp, Tcl_NewLongObj(match==0)); + Tcl_SetObjResult(interp, Tcl_NewBooleanObj(match ? 0 : 1)); return TCL_OK; } @@ -2760,7 +2760,7 @@ StringBytesCmd( } (void) TclGetStringFromObj(objv[1], &length); - Tcl_SetObjResult(interp, Tcl_NewLongObj(length)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(length)); return TCL_OK; } @@ -2794,7 +2794,7 @@ StringLenCmd( return TCL_ERROR; } - Tcl_SetObjResult(interp, Tcl_NewLongObj(Tcl_GetCharLength(objv[1]))); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tcl_GetCharLength(objv[1]))); return TCL_OK; } @@ -3411,8 +3411,8 @@ TclNRSwitchObjCmd( if (TclGetString(objv[i])[0] != '-') { break; } - if (Tcl_GetIndexFromObjStruct(interp, objv[i], options, - sizeof(char *), "option", 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, + &index) != TCL_OK) { return TCL_ERROR; } switch ((enum options) index) { @@ -3688,7 +3688,7 @@ TclNRSwitchObjCmd( rangeObjAry[0] = Tcl_NewLongObj(info.matches[j].start); rangeObjAry[1] = Tcl_NewLongObj(info.matches[j].end-1); } else { - rangeObjAry[0] = rangeObjAry[1] = Tcl_NewLongObj(-1); + rangeObjAry[0] = rangeObjAry[1] = Tcl_NewIntObj(-1); } /* @@ -4088,8 +4088,8 @@ TclNRTryObjCmd( int type; Tcl_Obj *info[5]; - if (Tcl_GetIndexFromObjStruct(interp, objv[i], handlerNames, - sizeof(char *), "handler type", 0, &type) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], handlerNames, "handler type", + 0, &type) != TCL_OK) { Tcl_DecrRefCount(handlersObj); return TCL_ERROR; } diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index fe18119..ff18bd4 100644 --- a/generic/tclDisassemble.c +++ b/generic/tclDisassemble.c @@ -267,9 +267,8 @@ DisassembleByteCodeObj( */ Tcl_AppendPrintfToObj(bufferObj, - "ByteCode %p, refCt %" TCL_LL_MODIFIER "d, epoch %" TCL_LL_MODIFIER "d, interp %p (epoch %" TCL_LL_MODIFIER "d)\n", - codePtr, (Tcl_WideUInt)codePtr->refCount, (Tcl_WideUInt)codePtr->compileEpoch, iPtr, - (Tcl_WideUInt)iPtr->compileEpoch); + "ByteCode %p, refCt %" TCL_Z_MODIFIER "u, epoch %" TCL_Z_MODIFIER "u, interp %p (epoch %" TCL_Z_MODIFIER "u)\n", + codePtr, codePtr->refCount, codePtr->compileEpoch, iPtr, iPtr->compileEpoch); Tcl_AppendToObj(bufferObj, " Source ", -1); PrintSourceToObj(bufferObj, codePtr->source, TclMin(codePtr->numSrcBytes, 55)); @@ -312,8 +311,8 @@ DisassembleByteCodeObj( int numCompiledLocals = procPtr->numCompiledLocals; Tcl_AppendPrintfToObj(bufferObj, - " Proc %p, refCt %" TCL_LL_MODIFIER "d, args %d, compiled locals %d\n", - procPtr, (Tcl_WideUInt)procPtr->refCount, procPtr->numArgs, + " Proc %p, refCt %" TCL_Z_MODIFIER "u, args %d, compiled locals %d\n", + procPtr, procPtr->refCount, procPtr->numArgs, numCompiledLocals); if (numCompiledLocals > 0) { CompiledLocal *localPtr = procPtr->firstLocalPtr; @@ -821,7 +820,7 @@ UpdateStringOfInstName( char *s, buf[TCL_INTEGER_SPACE + 5]; if (inst >= LAST_INST_OPCODE) { - sprintf(buf, "inst_%" TCL_Z_MODIFIER "d", inst); + sprintf(buf, "inst_%" TCL_Z_MODIFIER "u", inst); s = buf; } else { s = (char *) tclInstructionTable[inst].name; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index be4a744..9453996 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -1267,7 +1267,7 @@ int Tcl_ExprObj( Tcl_Interp *interp, /* Context in which to evaluate the * expression. */ - register Tcl_Obj *objPtr, /* Points to Tcl object containing expression + Tcl_Obj *objPtr, /* Points to Tcl object containing expression * to evaluate. */ Tcl_Obj **resultPtrPtr) /* Where the Tcl_Obj* that is the expression * result is stored if no errors occur. */ @@ -1384,7 +1384,7 @@ CompileExprObj( Interp *iPtr = (Interp *) interp; CompileEnv compEnv; /* Compilation environment structure allocated * in frame. */ - register ByteCode *codePtr = NULL; + ByteCode *codePtr = NULL; /* Tcl Internal type of bytecode. Initialized * to avoid compiler warning. */ @@ -1532,8 +1532,8 @@ TclCompileObj( const CmdFrame *invoker, int word) { - register Interp *iPtr = (Interp *) interp; - register ByteCode *codePtr; /* Tcl Internal type of bytecode. */ + Interp *iPtr = (Interp *) interp; + ByteCode *codePtr; /* Tcl Internal type of bytecode. */ Namespace *namespacePtr = iPtr->varFramePtr->nsPtr; /* @@ -2427,7 +2427,7 @@ TEBCresume( #ifdef TCL_COMPILE_DEBUG /* FIXME: What is the right thing to trace? */ { - register int i; + int i; TRACE(("%d [", opnd)); for (i=opnd-1 ; i>=0 ; i--) { @@ -4175,8 +4175,8 @@ TEBCresume( NEXT_INST_F(1, 0, 1); case INST_INFO_LEVEL_ARGS: { int level; - register CallFrame *framePtr = iPtr->varFramePtr; - register CallFrame *rootFramePtr = iPtr->rootFramePtr; + CallFrame *framePtr = iPtr->varFramePtr; + CallFrame *rootFramePtr = iPtr->rootFramePtr; TRACE(("\"%.30s\" => ", O2S(OBJ_AT_TOS))); if (TclGetIntFromObj(interp, OBJ_AT_TOS, &level) != TCL_OK) { @@ -4473,7 +4473,7 @@ TEBCresume( } { - register Method *const mPtr = + Method *const mPtr = contextPtr->callPtr->chain[newDepth].mPtr; return mPtr->typePtr->callProc(mPtr->clientData, interp, @@ -6416,8 +6416,8 @@ TEBCresume( case INST_DICT_GET: case INST_DICT_EXISTS: { - register Tcl_Interp *interp2 = interp; - register int found; + Tcl_Interp *interp2 = interp; + int found; opnd = TclGetUInt4AtPtr(pc+1); TRACE(("%u => ", opnd)); @@ -8617,7 +8617,7 @@ TclCompareTwoNumbers( static void PrintByteCodeInfo( - register ByteCode *codePtr) /* The bytecode whose summary is printed to + ByteCode *codePtr) /* The bytecode whose summary is printed to * stdout. */ { Proc *procPtr = codePtr->procPtr; @@ -8651,7 +8651,7 @@ PrintByteCodeInfo( #endif /* TCL_COMPILE_STATS */ if (procPtr != NULL) { fprintf(stdout, - " Proc 0x%p, refCt %zu, args %d, compiled locals %d\n", + " Proc 0x%p, refCt %" TCL_Z_MODIFIER "u, args %d, compiled locals %d\n", procPtr, procPtr->refCount, procPtr->numArgs, procPtr->numCompiledLocals); } @@ -8680,7 +8680,7 @@ PrintByteCodeInfo( #ifdef TCL_COMPILE_DEBUG static void ValidatePcAndStackTop( - register ByteCode *codePtr, /* The bytecode whose summary is printed to + ByteCode *codePtr, /* The bytecode whose summary is printed to * stdout. */ const unsigned char *pc, /* Points to first byte of a bytecode * instruction. The program counter. */ @@ -8915,7 +8915,7 @@ GetSrcInfoForPc( * of the command containing the pc should * be stored. */ { - register int pcOffset = (pc - codePtr->codeStart); + int pcOffset = (pc - codePtr->codeStart); int numCmds = codePtr->numCommands; unsigned char *codeDeltaNext, *codeLengthNext; unsigned char *srcDeltaNext, *srcLengthNext; @@ -9068,7 +9068,7 @@ GetExceptRangeForPc( { ExceptionRange *rangeArrayPtr; int numRanges = codePtr->numExceptRanges; - register ExceptionRange *rangePtr; + ExceptionRange *rangePtr; unsigned int pcOffset = pc - codePtr->codeStart; unsigned int start; @@ -9202,11 +9202,11 @@ TclExprFloatError( int TclLog2( - register int value) /* The integer for which to compute the log + int value) /* The integer for which to compute the log * base 2. */ { - register int n = value; - register int result = 0; + int n = value; + int result = 0; while (n > 1) { n = n >> 1; diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index e87b65a..3658121 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -741,8 +741,8 @@ ExpandLocalLiteralArray( size_t newSize = (currBytes <= UINT_MAX / 2) ? 2*currBytes : UINT_MAX; if (currBytes == newSize) { - Tcl_Panic("max size of Tcl literal array (%" TCL_LL_MODIFIER "d literals) exceeded", - (Tcl_WideInt)currElems); + Tcl_Panic("max size of Tcl literal array (%" TCL_Z_MODIFIER "u literals) exceeded", + currElems); } if (envPtr->mallocedLiteralArray) { @@ -1117,8 +1117,8 @@ TclLiteralStats( */ result = ckalloc(NUM_COUNTERS*60 + 300); - sprintf(result, "%" TCL_LL_MODIFIER "d entries in table, %" TCL_LL_MODIFIER "d buckets\n", - (Tcl_WideInt)tablePtr->numEntries, (Tcl_WideInt)tablePtr->numBuckets); + sprintf(result, "%" TCL_Z_MODIFIER "u entries in table, %" TCL_Z_MODIFIER "u buckets\n", + tablePtr->numEntries, tablePtr->numBuckets); p = result + strlen(result); for (i=0 ; i<NUM_COUNTERS ; i++) { sprintf(p, "number of buckets with %d entries: %d\n", @@ -1167,9 +1167,9 @@ TclVerifyLocalLiteralTable( if (localPtr->refCount != -1) { bytes = TclGetString(localPtr->objPtr); length = localPtr->objPtr->length; - Tcl_Panic("%s: local literal \"%.*s\" had bad refCount %" TCL_LL_MODIFIER "d", + Tcl_Panic("%s: local literal \"%.*s\" had bad refCount %" TCL_Z_MODIFIER "u", "TclVerifyLocalLiteralTable", - (length>60? 60 : (int) length), bytes, (Tcl_WideInt)localPtr->refCount); + (length>60? 60 : (int) length), bytes, localPtr->refCount); } if (localPtr->objPtr->bytes == NULL) { Tcl_Panic("%s: literal has NULL string rep", diff --git a/generic/tclOO.c b/generic/tclOO.c index 31e231f..e7062bc 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -701,7 +701,7 @@ AllocObject( while (1) { char objName[10 + TCL_INTEGER_SPACE]; - sprintf(objName, "::oo::Obj%" TCL_LL_MODIFIER "d", (Tcl_WideInt)++fPtr->tsdPtr->nsCount); + sprintf(objName, "::oo::Obj%" TCL_Z_MODIFIER "u", ++fPtr->tsdPtr->nsCount); oPtr->namespacePtr = Tcl_CreateNamespace(interp, objName, oPtr, NULL); if (oPtr->namespacePtr != NULL) { creationEpoch = fPtr->tsdPtr->nsCount; diff --git a/generic/tclObj.c b/generic/tclObj.c index 6ad57b3..640900a 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -984,7 +984,7 @@ TclDbDumpActiveObjects( tablePtr = tsdPtr->objThreadMap; if (tablePtr != NULL) { - fprintf(outFile, "total objects: %" TCL_LL_MODIFIER "d\n", (Tcl_WideInt)tablePtr->numEntries); + fprintf(outFile, "total objects: %" TCL_Z_MODIFIER "u\n", tablePtr->numEntries); for (hPtr = Tcl_FirstHashEntry(tablePtr, &hSearch); hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { ObjData *objData = Tcl_GetHashValue(hPtr); @@ -3913,7 +3913,7 @@ Tcl_RepresentationCmd( * "1872361827361287" */ - descObj = Tcl_ObjPrintf("value is a %s with a refcount of %" TCL_Z_MODIFIER "d," + descObj = Tcl_ObjPrintf("value is a %s with a refcount of %" TCL_Z_MODIFIER "u," " object pointer at %p", objv[1]->typePtr ? objv[1]->typePtr->name : "pure string", objv[1]->refCount, objv[1]); diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 34474f1..411caa4 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -2190,8 +2190,8 @@ Tcl_AppendFormatToObj( case 'x': case 'X': case 'b': { - Tcl_WideUInt bits = (Tcl_WideUInt) 0; - Tcl_WideInt numDigits = (Tcl_WideInt) 0; + Tcl_WideUInt bits = 0; + Tcl_WideInt numDigits = 0; int length, numBits = 4, base = 16, index = 0, shift = 0; Tcl_Obj *pure; char *bytes; diff --git a/generic/tclStringRep.h b/generic/tclStringRep.h index f9faf2e..767751d 100644 --- a/generic/tclStringRep.h +++ b/generic/tclStringRep.h @@ -71,8 +71,8 @@ typedef struct { #define stringCheckLimits(numChars) \ do { \ if ((size_t)(numChars) > STRING_MAXCHARS) { \ - Tcl_Panic("max length for a Tcl unicode value (%" TCL_LL_MODIFIER "d chars) exceeded", \ - (Tcl_WideInt)STRING_MAXCHARS); \ + Tcl_Panic("max length for a Tcl unicode value (%" TCL_Z_MODIFIER "u chars) exceeded", \ + STRING_MAXCHARS); \ } \ } while (0) #define stringAttemptAlloc(numChars) \ |