diff options
author | sebres <sebres@users.sourceforge.net> | 2019-01-25 20:17:46 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2019-01-25 20:17:46 (GMT) |
commit | ec6bc3e8fc49444829d56dfd699dd84bd27331fc (patch) | |
tree | 6eeead7f6c94763b755d619f1cf16e8ddef5c0f2 | |
parent | 7a2c96b4211c5695bcfab86f361225c409e801c9 (diff) | |
download | tcl-ec6bc3e8fc49444829d56dfd699dd84bd27331fc.zip tcl-ec6bc3e8fc49444829d56dfd699dd84bd27331fc.tar.gz tcl-ec6bc3e8fc49444829d56dfd699dd84bd27331fc.tar.bz2 |
small optimization of format-proc tokens, that are don't use `val` in callback, as well as don't do the back-conversion from int to string (output inside fmtproc) - switch to CFMTT_PROC token type.
-rw-r--r-- | generic/tclClockFmt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c index f3ac90a..b4d7b14 100644 --- a/generic/tclClockFmt.c +++ b/generic/tclClockFmt.c @@ -2801,7 +2801,7 @@ static ClockFormatTokenMap FmtSTokenMap[] = { /* %V */ {CTOKT_INT, "0", 2, 0, 0, 0, TclOffset(DateFormat, date.iso8601Week), NULL}, /* %z %Z */ - {CTOKT_INT, NULL, 0, 0, 0, 0, 0, + {CFMTT_PROC, NULL, 0, 0, 0, 0, 0, ClockFmtToken_TimeZone_Proc, NULL}, /* %g */ {CTOKT_INT, "0", 2, 0, 0, 100, TclOffset(DateFormat, date.iso8601Year), NULL}, @@ -2818,7 +2818,7 @@ static ClockFormatTokenMap FmtSTokenMap[] = { /* %t */ {CTOKT_CHAR, "\t", 0, 0, 0, 0, 0, NULL}, /* %Q */ - {CTOKT_INT, NULL, 0, 0, 0, 0, 0, + {CFMTT_PROC, NULL, 0, 0, 0, 0, 0, ClockFmtToken_StarDate_Proc, NULL}, }; static const char *FmtSTokenMapAliasIndex[2] = { @@ -2830,7 +2830,7 @@ static const char *FmtETokenMapIndex = "Eys"; static ClockFormatTokenMap FmtETokenMap[] = { /* %EE */ - {CTOKT_INT, NULL, 0, 0, 0, 0, TclOffset(DateFormat, date.era), + {CFMTT_PROC, NULL, 0, 0, 0, 0, 0, ClockFmtToken_LocaleERA_Proc, NULL}, /* %Ey %EC */ {CTOKT_INT, NULL, 0, 0, 0, 0, TclOffset(DateFormat, date.year), |