Browse Source

avoid "magic constant" 32 (the difference from 'A' to 'a')

Roberto Ierusalimschy 14 years ago
parent
commit
f9eea453b7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lctype.h

+ 2 - 2
lctype.h

@@ -1,5 +1,5 @@
 /*
-** $Id: lctype.h,v 1.9 2011/06/23 16:00:43 roberto Exp roberto $
+** $Id: lctype.h,v 1.10 2011/06/24 12:25:33 roberto Exp roberto $
 ** 'ctype' functions for Lua
 ** See Copyright Notice in lua.h
 */
@@ -64,7 +64,7 @@
 /*
 ** this 'ltolower' only works for alphabetic characters
 */
-#define ltolower(c)	((c) | 32)
+#define ltolower(c)	((c) | ('A' ^ 'a'))
 
 
 /* two more entries for 0 and -1 (EOZ) */