@@ -203,7 +203,7 @@ void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
203
203
size_t len ;
204
204
int error = 0 ;
205
205
zend_long ctx_value ;
206
- char * p ;
206
+ const char * p ;
207
207
208
208
/* Parse options */
209
209
FETCH_LONG_OPTION (min_range , "min_range" );
@@ -272,7 +272,7 @@ void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
272
272
273
273
void php_filter_boolean (PHP_INPUT_FILTER_PARAM_DECL ) /* {{{ */
274
274
{
275
- char * str = Z_STRVAL_P (value );
275
+ const char * str = Z_STRVAL_P (value );
276
276
size_t len = Z_STRLEN_P (value );
277
277
int ret ;
278
278
@@ -342,7 +342,7 @@ void php_filter_boolean(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
342
342
void php_filter_float (PHP_INPUT_FILTER_PARAM_DECL ) /* {{{ */
343
343
{
344
344
size_t len ;
345
- char * str , * end ;
345
+ const char * str , * end ;
346
346
char * num , * p ;
347
347
zval * option_val ;
348
348
char * decimal ;
@@ -504,9 +504,9 @@ void php_filter_validate_regexp(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
504
504
}
505
505
}
506
506
507
- static int _php_filter_validate_domain (char * domain , size_t len , zend_long flags ) /* {{{ */
507
+ static int _php_filter_validate_domain (const char * domain , size_t len , zend_long flags ) /* {{{ */
508
508
{
509
- char * e , * s , * t ;
509
+ const char * e , * s , * t ;
510
510
size_t l ;
511
511
int hostname = flags & FILTER_FLAG_HOSTNAME ;
512
512
unsigned char i = 1 ;
@@ -564,7 +564,7 @@ void php_filter_validate_domain(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
564
564
}
565
565
/* }}} */
566
566
567
- static int is_userinfo_valid (zend_string * str )
567
+ static int is_userinfo_valid (const zend_string * str )
568
568
{
569
569
const char * valid = "-._~!$&'()*+,;=:" ;
570
570
const char * p = ZSTR_VAL (str );
@@ -723,7 +723,7 @@ void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
723
723
}
724
724
/* }}} */
725
725
726
- static int _php_filter_validate_ipv4 (char * str , size_t str_len , int * ip ) /* {{{ */
726
+ static int _php_filter_validate_ipv4 (const char * str , size_t str_len , int * ip ) /* {{{ */
727
727
{
728
728
const char * end = str + str_len ;
729
729
int num , m ;
@@ -763,7 +763,7 @@ static int _php_filter_validate_ipv6(const char *str, size_t str_len, int ip[8])
763
763
int compressed_pos = -1 ;
764
764
int blocks = 0 ;
765
765
int num , n , i ;
766
- char * ipv4 ;
766
+ const char * ipv4 ;
767
767
const char * end ;
768
768
int ip4elm [4 ];
769
769
const char * s = str ;
@@ -1035,7 +1035,7 @@ void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
1035
1035
1036
1036
void php_filter_validate_mac (PHP_INPUT_FILTER_PARAM_DECL ) /* {{{ */
1037
1037
{
1038
- char * input = Z_STRVAL_P (value );
1038
+ const char * input = Z_STRVAL_P (value );
1039
1039
size_t input_len = Z_STRLEN_P (value );
1040
1040
int tokens , length , exp_separator_set ;
1041
1041
size_t exp_separator_len ;
0 commit comments