@@ -203,7 +203,7 @@ void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
203203 size_t len ;
204204 int error = 0 ;
205205 zend_long ctx_value ;
206- char * p ;
206+ const char * p ;
207207
208208 /* Parse options */
209209 FETCH_LONG_OPTION (min_range , "min_range" );
@@ -272,7 +272,7 @@ void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
272272
273273void php_filter_boolean (PHP_INPUT_FILTER_PARAM_DECL ) /* {{{ */
274274{
275- char * str = Z_STRVAL_P (value );
275+ const char * str = Z_STRVAL_P (value );
276276 size_t len = Z_STRLEN_P (value );
277277 int ret ;
278278
@@ -342,7 +342,7 @@ void php_filter_boolean(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
342342void php_filter_float (PHP_INPUT_FILTER_PARAM_DECL ) /* {{{ */
343343{
344344 size_t len ;
345- char * str , * end ;
345+ const char * str , * end ;
346346 char * num , * p ;
347347 zval * option_val ;
348348 char * decimal ;
@@ -504,9 +504,9 @@ void php_filter_validate_regexp(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
504504 }
505505}
506506
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 ) /* {{{ */
508508{
509- char * e , * s , * t ;
509+ const char * e , * s , * t ;
510510 size_t l ;
511511 int hostname = flags & FILTER_FLAG_HOSTNAME ;
512512 unsigned char i = 1 ;
@@ -564,7 +564,7 @@ void php_filter_validate_domain(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
564564}
565565/* }}} */
566566
567- static int is_userinfo_valid (zend_string * str )
567+ static int is_userinfo_valid (const zend_string * str )
568568{
569569 const char * valid = "-._~!$&'()*+,;=:" ;
570570 const char * p = ZSTR_VAL (str );
@@ -723,7 +723,7 @@ void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
723723}
724724/* }}} */
725725
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 ) /* {{{ */
727727{
728728 const char * end = str + str_len ;
729729 int num , m ;
@@ -763,7 +763,7 @@ static int _php_filter_validate_ipv6(const char *str, size_t str_len, int ip[8])
763763 int compressed_pos = -1 ;
764764 int blocks = 0 ;
765765 int num , n , i ;
766- char * ipv4 ;
766+ const char * ipv4 ;
767767 const char * end ;
768768 int ip4elm [4 ];
769769 const char * s = str ;
@@ -1035,7 +1035,7 @@ void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
10351035
10361036void php_filter_validate_mac (PHP_INPUT_FILTER_PARAM_DECL ) /* {{{ */
10371037{
1038- char * input = Z_STRVAL_P (value );
1038+ const char * input = Z_STRVAL_P (value );
10391039 size_t input_len = Z_STRLEN_P (value );
10401040 int tokens , length , exp_separator_set ;
10411041 size_t exp_separator_len ;
0 commit comments