diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2012-12-23 08:17:17 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2012-12-23 08:17:17 (GMT) |
| commit | 7689d389ceccb11dcfac3d190b36dba6331e31db (patch) | |
| tree | 904a5c784012083beffa88301ce90c0d9ca69bc6 /generic/tclUtil.c | |
| parent | 90a906b49950acee138a2d93310fe5b16dd5d66c (diff) | |
| download | tcl-7689d389ceccb11dcfac3d190b36dba6331e31db.zip tcl-7689d389ceccb11dcfac3d190b36dba6331e31db.tar.gz tcl-7689d389ceccb11dcfac3d190b36dba6331e31db.tar.bz2 | |
Change back to using an isDigit function. We simply don't need to make any
(formally non-portable) assumptions about what happens when an unsigned zero
is decremented, and the code isn't in a performance-critical area.
Remark by jan.nijtmans: The macro is perfectly portable! Not portable is the
exact result of the substraction ('\xB0' - '0' might give 0x80 on some platforms and 0xffffff80 on others), but comparing <= 9 always gives the correct result. We are only checking for digits here! The macro correctly inlines with any compiler, so it's better anyway.
Remark by dkf: But it's less clear. In this code, that's more important than a teeny bit of speed from inlining in a non-critical location.
Diffstat (limited to 'generic/tclUtil.c')
0 files changed, 0 insertions, 0 deletions
