summaryrefslogtreecommitdiffstats
path: root/generic/tclCkalloc.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-12 13:43:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-12 13:43:15 (GMT)
commit9f8e844f9c423ce1ff450461016db86873db4a45 (patch)
treedfe03fbf8b0de7db9d327f5185b65ab893af5755 /generic/tclCkalloc.c
parent59f0c070d62204e43e5d39d6810a444218ebebb1 (diff)
downloadtcl-9f8e844f9c423ce1ff450461016db86873db4a45.zip
tcl-9f8e844f9c423ce1ff450461016db86873db4a45.tar.gz
tcl-9f8e844f9c423ce1ff450461016db86873db4a45.tar.bz2
If %llu is considered invalid, it means that "%" TCL_LL_MODIFIER "u" cannot be used Tcl_ObjPrintf(), but only in sprintf(). That's unfortunate, clearly an oversight in TIP #237. Conclusion: new TIP must be written to correct this.
I'll read a TIP and see what case you have, but TCL_LL_MODIFIER was never meant to play any role in [format] or in Tcl_ObjPrintf(). TCL_LL_MODIFIER exists to help deal with platform differences in sprintf() calls. Tcl_ObjPrintf() in contrast ought to be consistent in its behavior across platforms and should not need such things. If that's false, then fixes to Tcl_ObjPrintf() are in order.
Diffstat (limited to 'generic/tclCkalloc.c')
-rw-r--r--generic/tclCkalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c
index 3484a97..123d872 100644
--- a/generic/tclCkalloc.c
+++ b/generic/tclCkalloc.c
@@ -859,7 +859,7 @@ MemoryCmd(
}
if (strcmp(argv[1],"info") == 0) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "%-25s %10u\n%-25s %10u\n%-25s %10u\n%-25s %10" TCL_LL_MODIFIER"u\n%-25s %10u\n%-25s %10" TCL_LL_MODIFIER "u\n",
+ "%-25s %10u\n%-25s %10u\n%-25s %10u\n%-25s %10" TCL_LL_MODIFIER"d\n%-25s %10u\n%-25s %10" TCL_LL_MODIFIER "d\n",
"total mallocs", total_mallocs, "total frees", total_frees,
"current packets allocated", current_malloc_packets,
"current bytes allocated", (Tcl_WideInt)current_bytes_malloced,