@@ -184,12 +184,12 @@ divide_nearest(PyObject *m, PyObject *n)
184184 * and the number of days before that month in the same year. These
185185 * are correct for non-leap years only.
186186 */
187- static int _days_in_month [] = {
187+ static const int _days_in_month [] = {
188188 0 , /* unused; this vector uses 1-based indexing */
189189 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31
190190};
191191
192- static int _days_before_month [] = {
192+ static const int _days_before_month [] = {
193193 0 , /* unused; this vector uses 1-based indexing */
194194 0 , 31 , 59 , 90 , 120 , 151 , 181 , 212 , 243 , 273 , 304 , 334
195195};
@@ -1009,10 +1009,10 @@ append_keyword_tzinfo(PyObject *repr, PyObject *tzinfo)
10091009static PyObject *
10101010format_ctime (PyDateTime_Date * date , int hours , int minutes , int seconds )
10111011{
1012- static const char * DayNames [] = {
1012+ static const char * const DayNames [] = {
10131013 "Mon" , "Tue" , "Wed" , "Thu" , "Fri" , "Sat" , "Sun"
10141014 };
1015- static const char * MonthNames [] = {
1015+ static const char * const MonthNames [] = {
10161016 "Jan" , "Feb" , "Mar" , "Apr" , "May" , "Jun" ,
10171017 "Jul" , "Aug" , "Sep" , "Oct" , "Nov" , "Dec"
10181018 };
@@ -2307,7 +2307,7 @@ static PyMethodDef delta_methods[] = {
23072307 {NULL , NULL },
23082308};
23092309
2310- static char delta_doc [] =
2310+ static const char delta_doc [] =
23112311PyDoc_STR ("Difference between two datetime values." );
23122312
23132313static PyNumberMethods delta_as_number = {
@@ -2886,7 +2886,7 @@ static PyMethodDef date_methods[] = {
28862886 {NULL , NULL }
28872887};
28882888
2889- static char date_doc [] =
2889+ static const char date_doc [] =
28902890PyDoc_STR ("date(year, month, day) --> date object" );
28912891
28922892static PyNumberMethods date_as_number = {
@@ -3155,7 +3155,7 @@ static PyMethodDef tzinfo_methods[] = {
31553155 {NULL , NULL }
31563156};
31573157
3158- static char tzinfo_doc [] =
3158+ static const char tzinfo_doc [] =
31593159PyDoc_STR ("Abstract base class for time zone info objects." );
31603160
31613161static PyTypeObject PyDateTime_TZInfoType = {
@@ -3387,7 +3387,7 @@ static PyMethodDef timezone_methods[] = {
33873387 {NULL , NULL }
33883388};
33893389
3390- static char timezone_doc [] =
3390+ static const char timezone_doc [] =
33913391PyDoc_STR ("Fixed offset from UTC implementation of tzinfo." );
33923392
33933393static PyTypeObject PyDateTime_TimeZoneType = {
@@ -3877,7 +3877,7 @@ static PyMethodDef time_methods[] = {
38773877 {NULL , NULL }
38783878};
38793879
3880- static char time_doc [] =
3880+ static const char time_doc [] =
38813881PyDoc_STR ("time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --> a time object\n\
38823882\n\
38833883All arguments are optional. tzinfo may be None, or an instance of\n\
@@ -5065,7 +5065,7 @@ static PyMethodDef datetime_methods[] = {
50655065 {NULL , NULL }
50665066};
50675067
5068- static char datetime_doc [] =
5068+ static const char datetime_doc [] =
50695069PyDoc_STR ("datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])\n\
50705070\n\
50715071The year, month and day arguments are required. tzinfo may be None, or an\n\
0 commit comments