diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-06-28 13:44:23 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-06-28 13:44:23 (GMT) |
commit | f5cec2b1ff8efe0e8ebd0c5f5b121ae0bf8055bb (patch) | |
tree | 6a4703fb4ee4538ab049c3c0f2165e5e0166e00f /generic | |
parent | cd8fa05e72bb9e525feb1e1a3409e18da78da5c5 (diff) | |
parent | 073ff3c5fe40eeac93ae5508b647a7019006f431 (diff) | |
download | tcl-f5cec2b1ff8efe0e8ebd0c5f5b121ae0bf8055bb.zip tcl-f5cec2b1ff8efe0e8ebd0c5f5b121ae0bf8055bb.tar.gz tcl-f5cec2b1ff8efe0e8ebd0c5f5b121ae0bf8055bb.tar.bz2 |
merge core-8-6-branch
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclStringObj.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 37da311..2305220 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -2029,9 +2029,12 @@ Tcl_AppendFormatToObj( segmentLimit -= 1; precision--; break; + case 'X': + Tcl_AppendToObj(segment, "0X", 2); + segmentLimit -= 2; + break; case 'p': case 'x': - case 'X': Tcl_AppendToObj(segment, "0x", 2); segmentLimit -= 2; break; @@ -2200,7 +2203,11 @@ Tcl_AppendFormatToObj( } digitOffset = (int) (bits % base); if (digitOffset > 9) { - bytes[numDigits] = 'a' + digitOffset - 10; + if (ch == 'X') { + bytes[numDigits] = 'A' + digitOffset - 10; + } else { + bytes[numDigits] = 'a' + digitOffset - 10; + } } else { bytes[numDigits] = '0' + digitOffset; } @@ -2322,14 +2329,6 @@ Tcl_AppendFormatToObj( goto error; } - switch (ch) { - case 'E': - case 'G': - case 'X': { - Tcl_SetObjLength(segment, Tcl_UtfToUpper(TclGetString(segment))); - } - } - if (width>0 && numChars<0) { numChars = Tcl_GetCharLength(segment); } |