diff options
author | Andy Lester <andy@petdance.com> | 2020-02-24 06:40:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 06:40:43 (GMT) |
commit | c3fa634096eedbaf477698adab666f03085a7928 (patch) | |
tree | 3e5c364e3d80907b9555bbac95945ef9d1948395 /Modules/_datetimemodule.c | |
parent | 4015d1cda3cdba869103779eb6ff32ad798ff885 (diff) | |
download | cpython-c3fa634096eedbaf477698adab666f03085a7928.zip cpython-c3fa634096eedbaf477698adab666f03085a7928.tar.gz cpython-c3fa634096eedbaf477698adab666f03085a7928.tar.bz2 |
closes bpo-39736: const strings in Modules/_datetimemodule.c and Modules/_testbuffer.c (GH-18637)
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r-- | Modules/_datetimemodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 4cafd14..4c985b3 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -4179,11 +4179,11 @@ static PyObject * time_isoformat(PyDateTime_Time *self, PyObject *args, PyObject *kw) { char buf[100]; - char *timespec = NULL; + const char *timespec = NULL; static char *keywords[] = {"timespec", NULL}; PyObject *result; int us = TIME_GET_MICROSECOND(self); - static char *specs[][2] = { + static const char *specs[][2] = { {"hours", "%02d"}, {"minutes", "%02d:%02d"}, {"seconds", "%02d:%02d:%02d"}, @@ -5415,7 +5415,7 @@ datetime_isoformat(PyDateTime_DateTime *self, PyObject *args, PyObject *kw) char buffer[100]; PyObject *result = NULL; int us = DATE_GET_MICROSECOND(self); - static char *specs[][2] = { + static const char *specs[][2] = { {"hours", "%04d-%02d-%02d%c%02d"}, {"minutes", "%04d-%02d-%02d%c%02d:%02d"}, {"seconds", "%04d-%02d-%02d%c%02d:%02d:%02d"}, |