summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixTest.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-12-23 08:17:17 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-12-23 08:17:17 (GMT)
commite2e451e2e550c7bff922e4a3966c2b4c2b90d158 (patch)
tree904a5c784012083beffa88301ce90c0d9ca69bc6 /unix/tclUnixTest.c
parented156a09fa82ac8d6ffed202a727a06aa1b4bd66 (diff)
downloadtcl-e2e451e2e550c7bff922e4a3966c2b4c2b90d158.zip
tcl-e2e451e2e550c7bff922e4a3966c2b4c2b90d158.tar.gz
tcl-e2e451e2e550c7bff922e4a3966c2b4c2b90d158.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 'unix/tclUnixTest.c')
0 files changed, 0 insertions, 0 deletions