diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2008-03-08 19:38:30 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2008-03-08 19:38:30 +0000 |
commit | 7198804ea6cfc68b245026dcf43bbff197cf7956 (patch) | |
tree | 582b3b9067b675f8185403a33572f4142cf3907d | |
parent | bda4463b94aca19bdd31e527c8b348f8fa3c7657 (diff) | |
download | pcre-7198804ea6cfc68b245026dcf43bbff197cf7956.tar.gz |
Added some missing "const"s to declarations of static tables in
pcre_compile.c and pcre_dfa_exec.c.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@327 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | pcre_compile.c | 4 | ||||
-rw-r--r-- | pcre_dfa_exec.c | 6 |
3 files changed, 8 insertions, 5 deletions
@@ -33,6 +33,9 @@ Version 7.7 05-Mar-08 6. Applied Craig's patch to the QuoteMeta function so that it escapes the NUL character as backslash + 0 rather than backslash + NUL, because PCRE doesn't support NULs in patterns. + +7. Added some missing "const"s to declarations of static tables in + pcre_compile.c and pcre_dfa_exec.c. Version 7.6 28-Jan-08 diff --git a/pcre_compile.c b/pcre_compile.c index 6f2a87e..2cacfba 100644 --- a/pcre_compile.c +++ b/pcre_compile.c @@ -158,7 +158,7 @@ static const char verbnames[] = "SKIP\0" "THEN"; -static verbitem verbs[] = { +static const verbitem verbs[] = { { 6, OP_ACCEPT }, { 6, OP_COMMIT }, { 1, OP_FAIL }, @@ -168,7 +168,7 @@ static verbitem verbs[] = { { 4, OP_THEN } }; -static int verbcount = sizeof(verbs)/sizeof(verbitem); +static const int verbcount = sizeof(verbs)/sizeof(verbitem); /* Tables of names of POSIX character classes and their lengths. The names are diff --git a/pcre_dfa_exec.c b/pcre_dfa_exec.c index 6283ff7..cfa3b2a 100644 --- a/pcre_dfa_exec.c +++ b/pcre_dfa_exec.c @@ -84,7 +84,7 @@ centralize the loading of these characters. In the case of Type * etc, the small value. ***NOTE*** If the start of this table is modified, the two tables that follow must also be modified. */ -static uschar coptable[] = { +static const uschar coptable[] = { 0, /* End */ 0, 0, 0, 0, 0, /* \A, \G, \K, \B, \b */ 0, 0, 0, 0, 0, 0, /* \D, \d, \S, \s, \W, \w */ @@ -138,7 +138,7 @@ static uschar coptable[] = { /* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W, and \w */ -static uschar toptable1[] = { +static const uschar toptable1[] = { 0, 0, 0, 0, 0, 0, ctype_digit, ctype_digit, ctype_space, ctype_space, @@ -146,7 +146,7 @@ static uschar toptable1[] = { 0 /* OP_ANY */ }; -static uschar toptable2[] = { +static const uschar toptable2[] = { 0, 0, 0, 0, 0, 0, ctype_digit, 0, ctype_space, 0, |