diff options
-rw-r--r-- | ext/ereg/regex/cclass.h | 8 | ||||
-rw-r--r-- | ext/ereg/regex/regerror.c | 12 | ||||
-rw-r--r-- | ext/filter/filter.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/ext/ereg/regex/cclass.h b/ext/ereg/regex/cclass.h index df41694b04..d6b5760eef 100644 --- a/ext/ereg/regex/cclass.h +++ b/ext/ereg/regex/cclass.h @@ -1,8 +1,8 @@ /* character-class table */ -static struct cclass { - unsigned char *name; - unsigned char *chars; - unsigned char *multis; +static const struct cclass { + const unsigned char *name; + const unsigned char *chars; + const unsigned char *multis; } cclasses[] = { {"alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", ""}, {"alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", diff --git a/ext/ereg/regex/regerror.c b/ext/ereg/regex/regerror.c index c4b1194948..00009a93c1 100644 --- a/ext/ereg/regex/regerror.c +++ b/ext/ereg/regex/regerror.c @@ -30,10 +30,10 @@ = #define REG_ATOI 255 // convert name to number (!) = #define REG_ITOA 0400 // convert number to name (!) */ -static struct rerr { +static const struct rerr { int code; - char *name; - char *explain; + const char *name; + const char *explain; } rerrs[] = { {REG_OKAY, "REG_OKAY", "no errors detected"}, {REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match"}, @@ -67,10 +67,10 @@ const regex_t *preg, char *errbuf, size_t errbuf_size) { - register struct rerr *r; + register const struct rerr *r; register size_t len; register int target = errcode &~ REG_ITOA; - register char *s; + register const char *s; char convbuf[50]; if (errcode == REG_ATOI) @@ -113,7 +113,7 @@ regatoi(preg, localbuf) const regex_t *preg; char *localbuf; { - register struct rerr *r; + register const struct rerr *r; for (r = rerrs; r->code >= 0; r++) if (strcmp(r->name, preg->re_endp) == 0) diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 9a347f2a79..3fe722bd75 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -38,7 +38,7 @@ typedef struct filter_list_entry { } filter_list_entry; /* {{{ filter_list */ -filter_list_entry filter_list[] = { +static const filter_list_entry filter_list[] = { { "int", FILTER_VALIDATE_INT, php_filter_int }, { "boolean", FILTER_VALIDATE_BOOLEAN, php_filter_boolean }, { "float", FILTER_VALIDATE_FLOAT, php_filter_float }, @@ -79,7 +79,7 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int /* {{{ filter_functions[] */ -const zend_function_entry filter_functions[] = { +static const zend_function_entry filter_functions[] = { PHP_FE(filter_input, NULL) PHP_FE(filter_var, NULL) PHP_FE(filter_input_array, NULL) |