summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-07-12 16:05:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-07-12 16:05:43 (GMT)
commita794c019fc0416aa27cb0dde1889e3486725aa4c (patch)
treef6c583ac1ec4985f3cd1d3eac93ce909c3f86436
parentab10db7f7cc5c8ab1e1716443f808e4d99f1f8ef (diff)
downloadtcl-a794c019fc0416aa27cb0dde1889e3486725aa4c.zip
tcl-a794c019fc0416aa27cb0dde1889e3486725aa4c.tar.gz
tcl-a794c019fc0416aa27cb0dde1889e3486725aa4c.tar.bz2
platform portable type matching in debug prints
-rw-r--r--generic/tclAssembly.c4
-rw-r--r--generic/tclCompile.c2
-rw-r--r--generic/tclExecute.c2
-rw-r--r--generic/tclObj.c8
-rw-r--r--generic/tclPreserve.c12
5 files changed, 14 insertions, 14 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index 754941f..1b87886 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -1035,8 +1035,8 @@ TclAssembleCode(
#ifdef TCL_COMPILE_DEBUG
if ((tclTraceCompile >= 2) && (envPtr->procPtr == NULL)) {
- printf(" %4d Assembling: ",
- envPtr->codeNext - envPtr->codeStart);
+ printf(" %4ld Assembling: ",
+ (long)(envPtr->codeNext - envPtr->codeStart));
TclPrintSource(stdout, parsePtr->commandStart,
TclMin(instLen, 55));
printf("\n");
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 0eaf834..18679b2 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -2468,7 +2468,7 @@ TclInitByteCodeObj(
#else
nextPtr = EncodeCmdLocMap(envPtr, codePtr, (unsigned char *) p);
if (((size_t)(nextPtr - p)) != cmdLocBytes) {
- Tcl_Panic("TclInitByteCodeObj: encoded cmd location bytes %d != expected size %d", (nextPtr - p), cmdLocBytes);
+ Tcl_Panic("TclInitByteCodeObj: encoded cmd location bytes %lu != expected size %lu", (unsigned long)(nextPtr - p), (unsigned long)cmdLocBytes);
}
#endif
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index fee096a..a7d6184 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -8441,7 +8441,7 @@ EvalStatsCmd(
Tcl_AppendPrintfToObj(objPtr, "\n----------------------------------------------------------------\n");
Tcl_AppendPrintfToObj(objPtr,
"Compilation and execution statistics for interpreter %#lx\n",
- iPtr);
+ (long int)iPtr);
Tcl_AppendPrintfToObj(objPtr, "\nNumber ByteCodes executed\t%ld\n",
statsPtr->numExecutions);
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 129d80d..95924c1 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -1330,7 +1330,7 @@ TclFreeObj(
ObjInitDeletionContext(context);
if (objPtr->refCount < -1) {
- Tcl_Panic("Reference count for %lx was negative", objPtr);
+ Tcl_Panic("Reference count for %p was negative", objPtr);
}
/*
@@ -3724,7 +3724,7 @@ Tcl_DbIncrRefCount(
hPtr = Tcl_FindHashEntry(tablePtr, objPtr);
if (!hPtr) {
Tcl_Panic("%s%s",
- "Trying to incr ref count of "
+ "Trying to incr ref count of ",
"Tcl_Obj allocated in another thread");
}
}
@@ -3789,7 +3789,7 @@ Tcl_DbDecrRefCount(
hPtr = Tcl_FindHashEntry(tablePtr, objPtr);
if (!hPtr) {
Tcl_Panic("%s%s",
- "Trying to decr ref count of "
+ "Trying to decr ref count of ",
"Tcl_Obj allocated in another thread");
}
@@ -3868,7 +3868,7 @@ Tcl_DbIsShared(
hPtr = Tcl_FindHashEntry(tablePtr, objPtr);
if (!hPtr) {
Tcl_Panic("%s%s",
- "Trying to check shared status of"
+ "Trying to check shared status of",
"Tcl_Obj allocated in another thread");
}
}
diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c
index cbd7b63..0bd8f93 100644
--- a/generic/tclPreserve.c
+++ b/generic/tclPreserve.c
@@ -368,10 +368,10 @@ TclHandleFree(
handlePtr = (HandleStruct *) handle;
#ifdef TCL_MEM_DEBUG
if (handlePtr->refCount == 0x61616161) {
- Tcl_Panic("using previously disposed TclHandle %x", handlePtr);
+ Tcl_Panic("using previously disposed TclHandle %p", handlePtr);
}
if (handlePtr->ptr2 != handlePtr->ptr) {
- Tcl_Panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
+ Tcl_Panic("someone has changed the block referenced by the handle %p\nfrom %p to %p",
handlePtr, handlePtr->ptr2, handlePtr->ptr);
}
#endif
@@ -411,10 +411,10 @@ TclHandlePreserve(
handlePtr = (HandleStruct *) handle;
#ifdef TCL_MEM_DEBUG
if (handlePtr->refCount == 0x61616161) {
- Tcl_Panic("using previously disposed TclHandle %x", handlePtr);
+ Tcl_Panic("using previously disposed TclHandle %p", handlePtr);
}
if ((handlePtr->ptr != NULL) && (handlePtr->ptr != handlePtr->ptr2)) {
- Tcl_Panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
+ Tcl_Panic("someone has changed the block referenced by the handle %p\nfrom %p to %p",
handlePtr, handlePtr->ptr2, handlePtr->ptr);
}
#endif
@@ -452,10 +452,10 @@ TclHandleRelease(
handlePtr = (HandleStruct *) handle;
#ifdef TCL_MEM_DEBUG
if (handlePtr->refCount == 0x61616161) {
- Tcl_Panic("using previously disposed TclHandle %x", handlePtr);
+ Tcl_Panic("using previously disposed TclHandle %p", handlePtr);
}
if ((handlePtr->ptr != NULL) && (handlePtr->ptr != handlePtr->ptr2)) {
- Tcl_Panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
+ Tcl_Panic("someone has changed the block referenced by the handle %p\nfrom %p to %p",
handlePtr, handlePtr->ptr2, handlePtr->ptr);
}
#endif