@@ -235,7 +235,7 @@ PHPAPI time_t php_time(void)
235235
236236#include "php_date_arginfo.h"
237237
238- static char * guess_timezone (const timelib_tzdb * tzdb );
238+ static const char * guess_timezone (const timelib_tzdb * tzdb );
239239static void date_register_classes (void );
240240/* }}} */
241241
@@ -549,7 +549,7 @@ static PHP_INI_MH(OnUpdate_date_timezone)
549549/* }}} */
550550
551551/* {{{ Helper functions */
552- static char * guess_timezone (const timelib_tzdb * tzdb )
552+ static const char * guess_timezone (const timelib_tzdb * tzdb )
553553{
554554 /* Checking whether timezone has been set with date_default_timezone_set() */
555555 if (DATEG (timezone ) && (strlen (DATEG (timezone ))) > 0 ) {
@@ -573,10 +573,9 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
573573
574574PHPAPI timelib_tzinfo * get_timezone_info (void )
575575{
576- char * tz ;
577576 timelib_tzinfo * tzi ;
578577
579- tz = guess_timezone (DATE_TIMEZONEDB );
578+ const char * tz = guess_timezone (DATE_TIMEZONEDB );
580579 tzi = php_date_parse_tzfile (tz , DATE_TIMEZONEDB );
581580 if (! tzi ) {
582581 zend_throw_error (date_ce_date_error , "Timezone database is corrupt. Please file a bug report as this should never happen" );
@@ -607,7 +606,7 @@ static const char * const day_short_names[] = {
607606 "Sun" , "Mon" , "Tue" , "Wed" , "Thu" , "Fri" , "Sat"
608607};
609608
610- static char * english_suffix (timelib_sll number )
609+ static const char * english_suffix (timelib_sll number )
611610{
612611 if (number >= 10 && number <= 19 ) {
613612 return "th" ;
@@ -1667,7 +1666,7 @@ static const zend_object_iterator_funcs date_period_it_funcs = {
16671666 NULL , /* get_gc */
16681667};
16691668
1670- zend_object_iterator * date_object_period_get_iterator (zend_class_entry * ce , zval * object , int by_ref ) /* {{{ */
1669+ static zend_object_iterator * date_object_period_get_iterator (zend_class_entry * ce , zval * object , int by_ref ) /* {{{ */
16711670{
16721671 date_period_it * iterator ;
16731672
@@ -2043,7 +2042,7 @@ static void php_timezone_to_string(php_timezone_obj *tzobj, zval *zv)
20432042 }
20442043}
20452044
2046- void date_timezone_object_to_hash (php_timezone_obj * tzobj , HashTable * props )
2045+ static void date_timezone_object_to_hash (php_timezone_obj * tzobj , HashTable * props )
20472046{
20482047 zval zv ;
20492048
0 commit comments