Skip to content

Commit

Permalink
ctype: make sane_ctype[] const array
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
pclouds authored and gitster committed Oct 15, 2012
1 parent 82dce99 commit ca5ab7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ctype.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ enum {
P = GIT_PATHSPEC_MAGIC /* other non-alnum, except for ] and } */
};

unsigned char sane_ctype[256] = {
const unsigned char sane_ctype[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, S, S, 0, 0, S, 0, 0, /* 0.. 15 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16.. 31 */
S, P, P, P, R, P, P, P, R, R, G, R, P, P, R, P, /* 32.. 47 */
Expand Down
2 changes: 1 addition & 1 deletion git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ extern const char tolower_trans_tbl[256];
#undef isupper
#undef tolower
#undef toupper
extern unsigned char sane_ctype[256];
extern const unsigned char sane_ctype[256];
#define GIT_SPACE 0x01
#define GIT_DIGIT 0x02
#define GIT_ALPHA 0x04
Expand Down

0 comments on commit ca5ab7d

Please sign in to comment.