@@ -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" );
@@ -589,7 +588,7 @@ static const char * const day_short_names[] = {
589
588
"Sun" , "Mon" , "Tue" , "Wed" , "Thu" , "Fri" , "Sat"
590
589
};
591
590
592
- static char * english_suffix (timelib_sll number )
591
+ static const char * english_suffix (timelib_sll number )
593
592
{
594
593
if (number >= 10 && number <= 19 ) {
595
594
return "th" ;
@@ -1649,7 +1648,7 @@ static const zend_object_iterator_funcs date_period_it_funcs = {
1649
1648
NULL , /* get_gc */
1650
1649
};
1651
1650
1652
- zend_object_iterator * date_object_period_get_iterator (zend_class_entry * ce , zval * object , int by_ref ) /* {{{ */
1651
+ static zend_object_iterator * date_object_period_get_iterator (zend_class_entry * ce , zval * object , int by_ref ) /* {{{ */
1653
1652
{
1654
1653
date_period_it * iterator ;
1655
1654
@@ -2011,7 +2010,7 @@ static void php_timezone_to_string(php_timezone_obj *tzobj, zval *zv)
2011
2010
}
2012
2011
}
2013
2012
2014
- void date_timezone_object_to_hash (php_timezone_obj * tzobj , HashTable * props )
2013
+ static void date_timezone_object_to_hash (php_timezone_obj * tzobj , HashTable * props )
2015
2014
{
2016
2015
zval zv ;
2017
2016
0 commit comments