diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-12-14 22:14:36 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-12-14 22:14:36 +0300 |
commit | 83e495e0fdc0c59b449bd173d0c8df1999239634 (patch) | |
tree | 80eb0e2e63b10f988add83a7d494838bd2cf9e56 /ext/date/php_date.c | |
parent | 5d367636389506d3aff2220b0f4c6f14a59f98ea (diff) | |
download | php-git-83e495e0fdc0c59b449bd173d0c8df1999239634.tar.gz |
Move constants into read-only data segment
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 3715e53ddb..77cad2d415 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1041,21 +1041,21 @@ PHPAPI timelib_tzinfo *get_timezone_info(void) /* {{{ date() and gmdate() data */ #include "zend_smart_str.h" -static char *mon_full_names[] = { +static const char * const mon_full_names[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; -static char *mon_short_names[] = { +static const char * const mon_short_names[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; -static char *day_full_names[] = { +static const char * const day_full_names[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; -static char *day_short_names[] = { +static const char * const day_short_names[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; @@ -1075,7 +1075,7 @@ static char *english_suffix(timelib_sll number) /* }}} */ /* {{{ day of week helpers */ -char *php_date_full_day_name(timelib_sll y, timelib_sll m, timelib_sll d) +static const char *php_date_full_day_name(timelib_sll y, timelib_sll m, timelib_sll d) { timelib_sll day_of_week = timelib_day_of_week(y, m, d); if (day_of_week < 0) { @@ -1084,7 +1084,7 @@ char *php_date_full_day_name(timelib_sll y, timelib_sll m, timelib_sll d) return day_full_names[day_of_week]; } -char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d) +static const char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d) { timelib_sll day_of_week = timelib_day_of_week(y, m, d); if (day_of_week < 0) { |