Revision: 327
http://vcs.pcre.org/viewvc?view=rev&revision=327
Author: ph10
Date: 2008-03-08 19:38:30 +0000 (Sat, 08 Mar 2008)
Log Message:
-----------
Added some missing "const"s to declarations of static tables in
pcre_compile.c and pcre_dfa_exec.c.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/pcre_compile.c
code/trunk/pcre_dfa_exec.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2008-03-08 17:24:02 UTC (rev 326)
+++ code/trunk/ChangeLog 2008-03-08 19:38:30 UTC (rev 327)
@@ -33,6 +33,9 @@
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
Modified: code/trunk/pcre_compile.c
===================================================================
--- code/trunk/pcre_compile.c 2008-03-08 17:24:02 UTC (rev 326)
+++ code/trunk/pcre_compile.c 2008-03-08 19:38:30 UTC (rev 327)
@@ -158,7 +158,7 @@
"SKIP\0"
"THEN";
-static verbitem verbs[] = {
+static const verbitem verbs[] = {
{ 6, OP_ACCEPT },
{ 6, OP_COMMIT },
{ 1, OP_FAIL },
@@ -168,7 +168,7 @@
{ 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
Modified: code/trunk/pcre_dfa_exec.c
===================================================================
--- code/trunk/pcre_dfa_exec.c 2008-03-08 17:24:02 UTC (rev 326)
+++ code/trunk/pcre_dfa_exec.c 2008-03-08 19:38:30 UTC (rev 327)
@@ -84,7 +84,7 @@
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 @@
/* 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 @@
0 /* OP_ANY */
};
-static uschar toptable2[] = {
+static const uschar toptable2[] = {
0, 0, 0, 0, 0, 0,
ctype_digit, 0,
ctype_space, 0,