summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-02 15:52:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-02 15:52:09 (GMT)
commit9a259b172375b510de40955def893799c4359cf2 (patch)
tree36294ec60f001d00395433b7dfa22ea975beb656 /generic
parent1782f8677925d45e83402a7f1fac4f4b0e1e367b (diff)
downloadtcl-9a259b172375b510de40955def893799c4359cf2.zip
tcl-9a259b172375b510de40955def893799c4359cf2.tar.gz
tcl-9a259b172375b510de40955def893799c4359cf2.tar.bz2
implement "I64" format in Tcl_ObjPrintf as well. Still to be tested.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclStringObj.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 4b171f3..65f9ab1 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -1865,6 +1865,9 @@ Tcl_AppendFormatToObj(
useWide = 1;
#endif
}
+ } else if ((ch == 'I') && (format[1] == '6') && (format[2] == '4')) {
+ step += 2;
+ useBig = 1;
}
format += step;
@@ -2509,6 +2512,13 @@ AppendPrintfToObjVA(
++size;
p++;
break;
+ case 'I':
+ if (p[1]=='6' && p[2]=='4') {
+ p += 2;
+ size = 2;
+ }
+ p++;
+ break;
case 'h':
size = -1;
default:
@@ -2712,7 +2722,7 @@ TclStringRepeat(
if (0 == Tcl_AttemptSetObjLength(objResultPtr, count*length)) {
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "string size overflow: unable to alloc %llu bytes",
+ "string size overflow: unable to alloc %" TCL_LL_MODIFIER "u bytes",
(Tcl_WideUInt)STRING_SIZE(count*length)));
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
}
@@ -2935,7 +2945,7 @@ TclStringCatObjv(
if (0 == Tcl_AttemptSetObjLength(objResultPtr, length)) {
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "concatenation failed: unable to alloc %llu bytes",
+ "concatenation failed: unable to alloc %" TCL_LL_MODIFIER "u bytes",
(Tcl_WideUInt)STRING_SIZE(length)));
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
}
@@ -2950,7 +2960,7 @@ TclStringCatObjv(
if (0 == Tcl_AttemptSetObjLength(objResultPtr, length)) {
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "concatenation failed: unable to alloc %llu bytes",
+ "concatenation failed: unable to alloc %" TCL_LL_MODIFIER "u bytes",
(Tcl_WideUInt)STRING_SIZE(length)));
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
}