diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-05-27 13:51:15 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-05-27 13:51:15 -0300 |
| commit | 139d562861a939ef0a8456c84874b783a7861a24 (patch) | |
| tree | 2751f74c6ecd3159c7fa54d654b95311582cc5ac | |
| parent | eea6d10866f04a7062d8d7d02984770b220d940e (diff) | |
| download | lua-139d562861a939ef0a8456c84874b783a7861a24.tar.gz lua-139d562861a939ef0a8456c84874b783a7861a24.tar.bz2 lua-139d562861a939ef0a8456c84874b783a7861a24.zip | |
type of 'luai_ctype_' array changed to unsigned (safer for bitwise
operations)
| -rw-r--r-- | lctype.c | 4 | ||||
| -rw-r--r-- | lctype.h | 6 |
2 files changed, 6 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lctype.c,v 1.5 2009/03/26 18:53:52 roberto Exp roberto $ | 2 | ** $Id: lctype.c,v 1.6 2009/05/18 17:15:14 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 | */ |
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | #include "lctype.h" | 9 | #include "lctype.h" |
| 10 | 10 | ||
| 11 | const char luai_ctype_[UCHAR_MAX + 2] = { | 11 | const lu_byte luai_ctype_[UCHAR_MAX + 2] = { |
| 12 | 0x00, /* EOZ */ | 12 | 0x00, /* EOZ */ |
| 13 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 13 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 14 | 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, | 14 | 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lctype.h,v 1.5 2009/03/26 18:53:52 roberto Exp roberto $ | 2 | ** $Id: lctype.h,v 1.6 2009/05/18 17:15:14 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 | */ |
| @@ -12,6 +12,8 @@ | |||
| 12 | 12 | ||
| 13 | #include "lua.h" | 13 | #include "lua.h" |
| 14 | 14 | ||
| 15 | #include "llimits.h" | ||
| 16 | |||
| 15 | 17 | ||
| 16 | #define ALPHABIT 0 | 18 | #define ALPHABIT 0 |
| 17 | #define DIGITBIT 1 | 19 | #define DIGITBIT 1 |
| @@ -42,7 +44,7 @@ | |||
| 42 | 44 | ||
| 43 | 45 | ||
| 44 | /* one more entry for 0 and one more for -1 (EOZ) */ | 46 | /* one more entry for 0 and one more for -1 (EOZ) */ |
| 45 | LUAI_DATA const char luai_ctype_[UCHAR_MAX + 2]; | 47 | LUAI_DATA const lu_byte luai_ctype_[UCHAR_MAX + 2]; |
| 46 | 48 | ||
| 47 | #endif | 49 | #endif |
| 48 | 50 | ||
