diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-03-11 10:27:32 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-03-11 10:27:32 -0300 |
commit | 6ffcf2136788b032bdc0f8520b1bbc2a4d2ea76e (patch) | |
tree | b411d35241864a0ab14d8077ab3fc1f833e01025 /lctype.h | |
parent | 6427c61e7c3e6acd467b488c573ac37b0f46d0a2 (diff) | |
download | lua-6ffcf2136788b032bdc0f8520b1bbc2a4d2ea76e.tar.gz lua-6ffcf2136788b032bdc0f8520b1bbc2a4d2ea76e.tar.bz2 lua-6ffcf2136788b032bdc0f8520b1bbc2a4d2ea76e.zip |
ctype 'lalpha' includes '_' (as '_' behaves as a letter from the
point of view of Lua)
Diffstat (limited to 'lctype.h')
-rw-r--r-- | lctype.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lctype.h,v 1.2 2009/02/20 13:11:15 roberto Exp roberto $ | 2 | ** $Id: lctype.h,v 1.3 2009/03/10 17:42: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 | */ |
@@ -23,8 +23,10 @@ | |||
23 | #define MASK(B) (1 << (B)) | 23 | #define MASK(B) (1 << (B)) |
24 | 24 | ||
25 | 25 | ||
26 | #define lisalpha(x) (luai_ctype_[x] & MASK(ALPHABIT)) | 26 | /* 'lalpha' (Lua alphabetic) includes '_' */ |
27 | #define lisalnum(x) (luai_ctype_[x] & (MASK(ALPHABIT) | MASK(DIGITBIT))) | 27 | #define lislalpha(x) (luai_ctype_[x] & MASK(ALPHABIT)) |
28 | /* ditto */ | ||
29 | #define lislalnum(x) (luai_ctype_[x] & (MASK(ALPHABIT) | MASK(DIGITBIT))) | ||
28 | #define lisdigit(x) (luai_ctype_[x] & MASK(DIGITBIT)) | 30 | #define lisdigit(x) (luai_ctype_[x] & MASK(DIGITBIT)) |
29 | #define lisspace(x) (luai_ctype_[x] & MASK(SPACEBIT)) | 31 | #define lisspace(x) (luai_ctype_[x] & MASK(SPACEBIT)) |
30 | #define lisprint(x) (luai_ctype_[x] & MASK(PRINTBIT)) | 32 | #define lisprint(x) (luai_ctype_[x] & MASK(PRINTBIT)) |