summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-14 14:14:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-14 14:14:17 (GMT)
commit82d0258052c45ac6767727539635540dc724182c (patch)
tree963258bf47328b692d688313d05078fc454802c3 /generic/tclStringObj.c
parent9a259b172375b510de40955def893799c4359cf2 (diff)
downloadtcl-82d0258052c45ac6767727539635540dc724182c.zip
tcl-82d0258052c45ac6767727539635540dc724182c.tar.gz
tcl-82d0258052c45ac6767727539635540dc724182c.tar.bz2
Implement all possible TCL_LL_MODIFIER formats in Tcl_ObjPrintf(), can be "ll", "I64" and "L", whatever the platform defines for long long integer. With test-cases.jn_wide_printf
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 65f9ab1..2b1dfc5 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -1866,7 +1866,12 @@ Tcl_AppendFormatToObj(
#endif
}
} else if ((ch == 'I') && (format[1] == '6') && (format[2] == '4')) {
- step += 2;
+ format += (step + 2);
+ step = Tcl_UtfToUniChar(format, &ch);
+ useBig = 1;
+ } else if (ch == 'L') {
+ format += step;
+ step = Tcl_UtfToUniChar(format, &ch);
useBig = 1;
}
@@ -2512,6 +2517,10 @@ AppendPrintfToObjVA(
++size;
p++;
break;
+ case 'L':
+ size = 2;
+ p++;
+ break;
case 'I':
if (p[1]=='6' && p[2]=='4') {
p += 2;