diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-06-27 15:22:46 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-06-27 15:22:46 -0300 |
commit | f9eea453b714bf8438e0f50d195b1bb1e8bf1a2f (patch) | |
tree | ce379b431f29e8d69953dc18d856cafa5c39fe66 /lctype.h | |
parent | 374773748b6b5890a0b842e6dbb90dfd2213c54c (diff) | |
download | lua-f9eea453b714bf8438e0f50d195b1bb1e8bf1a2f.tar.gz lua-f9eea453b714bf8438e0f50d195b1bb1e8bf1a2f.tar.bz2 lua-f9eea453b714bf8438e0f50d195b1bb1e8bf1a2f.zip |
avoid "magic constant" 32 (the difference from 'A' to 'a')
Diffstat (limited to 'lctype.h')
-rw-r--r-- | lctype.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lctype.h,v 1.9 2011/06/23 16:00:43 roberto Exp roberto $ | 2 | ** $Id: lctype.h,v 1.10 2011/06/24 12:25:33 roberto Exp roberto $ |
3 | ** 'ctype' functions for Lua | 3 | ** 'ctype' functions for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -64,7 +64,7 @@ | |||
64 | /* | 64 | /* |
65 | ** this 'ltolower' only works for alphabetic characters | 65 | ** this 'ltolower' only works for alphabetic characters |
66 | */ | 66 | */ |
67 | #define ltolower(c) ((c) | 32) | 67 | #define ltolower(c) ((c) | ('A' ^ 'a')) |
68 | 68 | ||
69 | 69 | ||
70 | /* two more entries for 0 and -1 (EOZ) */ | 70 | /* two more entries for 0 and -1 (EOZ) */ |