diff options
Diffstat (limited to 'generic/tclStringObj.c')
| -rw-r--r-- | generic/tclStringObj.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 6d16be5..827c227 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -2101,8 +2101,21 @@ Tcl_AppendFormatToObj( format += step; step = TclUtfToUniChar(format, &ch); } - } else if ((ch == 't') || (ch == 'z') || (ch == 'q') || (ch == 'j') - || (ch == 'L')) { + } else if ((ch == 'q') || (ch == 'j')) { + format += step; + step = TclUtfToUniChar(format, &ch); +#ifndef TCL_WIDE_INT_IS_LONG + useWide = 1; +#endif + } else if ((ch == 't') || (ch == 'z')) { + format += step; + step = TclUtfToUniChar(format, &ch); +#ifndef TCL_WIDE_INT_IS_LONG + if (sizeof(void *) > sizeof(int)) { + useWide = 1; + } +#endif + } else if (ch == 'L') { format += step; step = TclUtfToUniChar(format, &ch); useBig = 1; @@ -2174,7 +2187,7 @@ Tcl_AppendFormatToObj( Tcl_Size toAppend; #ifndef TCL_WIDE_INT_IS_LONG - if (ch == 'p') { + if ((ch == 'p') && (sizeof(void *) > sizeof(int))) { useWide = 1; } #endif |
