@@ -235,7 +235,7 @@ PHPAPI time_t php_time(void)
235
235
236
236
#include "php_date_arginfo.h"
237
237
238
- static char * guess_timezone (const timelib_tzdb * tzdb );
238
+ static const char * guess_timezone (const timelib_tzdb * tzdb );
239
239
static void date_register_classes (void );
240
240
/* }}} */
241
241
@@ -531,7 +531,7 @@ static PHP_INI_MH(OnUpdate_date_timezone)
531
531
/* }}} */
532
532
533
533
/* {{{ Helper functions */
534
- static char * guess_timezone (const timelib_tzdb * tzdb )
534
+ static const char * guess_timezone (const timelib_tzdb * tzdb )
535
535
{
536
536
/* Checking whether timezone has been set with date_default_timezone_set() */
537
537
if (DATEG (timezone ) && (strlen (DATEG (timezone ))) > 0 ) {
@@ -555,10 +555,9 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
555
555
556
556
PHPAPI timelib_tzinfo * get_timezone_info (void )
557
557
{
558
- char * tz ;
559
558
timelib_tzinfo * tzi ;
560
559
561
- tz = guess_timezone (DATE_TIMEZONEDB );
560
+ const char * tz = guess_timezone (DATE_TIMEZONEDB );
562
561
tzi = php_date_parse_tzfile (tz , DATE_TIMEZONEDB );
563
562
if (! tzi ) {
564
563
zend_throw_error (NULL , "Timezone database is corrupt. Please file a bug report as this should never happen" );
@@ -619,7 +618,7 @@ static const char * const day_short_names[] = {
619
618
"Sun" , "Mon" , "Tue" , "Wed" , "Thu" , "Fri" , "Sat"
620
619
};
621
620
622
- static char * english_suffix (timelib_sll number )
621
+ static const char * english_suffix (timelib_sll number )
623
622
{
624
623
if (number >= 10 && number <= 19 ) {
625
624
return "th" ;
@@ -1679,7 +1678,7 @@ static const zend_object_iterator_funcs date_period_it_funcs = {
1679
1678
NULL , /* get_gc */
1680
1679
};
1681
1680
1682
- zend_object_iterator * date_object_period_get_iterator (zend_class_entry * ce , zval * object , int by_ref ) /* {{{ */
1681
+ static zend_object_iterator * date_object_period_get_iterator (zend_class_entry * ce , zval * object , int by_ref ) /* {{{ */
1683
1682
{
1684
1683
date_period_it * iterator ;
1685
1684
@@ -2053,7 +2052,7 @@ static void php_timezone_to_string(php_timezone_obj *tzobj, zval *zv)
2053
2052
}
2054
2053
}
2055
2054
2056
- void date_timezone_object_to_hash (php_timezone_obj * tzobj , HashTable * props )
2055
+ static void date_timezone_object_to_hash (php_timezone_obj * tzobj , HashTable * props )
2057
2056
{
2058
2057
zval zv ;
2059
2058
0 commit comments