summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.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/tclStringObj.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/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 560c169..7c898b7 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -2780,7 +2780,7 @@ TclStringRepeat(
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"string size overflow: unable to alloc %"
- TCL_LL_MODIFIER "u bytes",
+ TCL_LL_MODIFIER "d bytes",
(Tcl_WideUInt)STRING_SIZE(count*length)));
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
}
@@ -3004,7 +3004,7 @@ TclStringCatObjv(
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"concatenation failed: unable to alloc %"
- TCL_LL_MODIFIER "u bytes",
+ TCL_LL_MODIFIER "d bytes",
(Tcl_WideUInt)STRING_SIZE(length)));
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
}
@@ -3020,7 +3020,7 @@ TclStringCatObjv(
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"concatenation failed: unable to alloc %"
- TCL_LL_MODIFIER "u bytes",
+ TCL_LL_MODIFIER "d bytes",
(Tcl_WideUInt)STRING_SIZE(length)));
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
}