diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-04-12 13:43:15 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-04-12 13:43:15 (GMT) |
commit | 5ba18ec98dfa4afe775a3f7a7caa8d55774d907d (patch) | |
tree | dfe03fbf8b0de7db9d327f5185b65ab893af5755 /generic/tclStringObj.c | |
parent | 62b2b9bf4592ef78dc71f0bbdbdbaafea3a58713 (diff) | |
download | tcl-5ba18ec98dfa4afe775a3f7a7caa8d55774d907d.zip tcl-5ba18ec98dfa4afe775a3f7a7caa8d55774d907d.tar.gz tcl-5ba18ec98dfa4afe775a3f7a7caa8d55774d907d.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.c | 6 |
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); } |