Issue #25923: Added the const qualifier to static constant arrays.

This commit is contained in:
Serhiy Storchaka 2015-12-25 19:53:18 +02:00
parent ea8c43152f
commit 2d06e84455
44 changed files with 139 additions and 134 deletions

View file

@ -60,10 +60,10 @@ typedef enum {
typedef struct {
QuoteStyle style;
char *name;
const char *name;
} StyleDesc;
static StyleDesc quote_styles[] = {
static const StyleDesc quote_styles[] = {
{ QUOTE_MINIMAL, "QUOTE_MINIMAL" },
{ QUOTE_ALL, "QUOTE_ALL" },
{ QUOTE_NONNUMERIC, "QUOTE_NONNUMERIC" },
@ -286,7 +286,7 @@ _set_str(const char *name, PyObject **target, PyObject *src, const char *dflt)
static int
dialect_check_quoting(int quoting)
{
StyleDesc *qs;
const StyleDesc *qs;
for (qs = quote_styles; qs->name; qs++) {
if ((int)qs->style == quoting)
@ -1633,7 +1633,7 @@ PyMODINIT_FUNC
PyInit__csv(void)
{
PyObject *module;
StyleDesc *style;
const StyleDesc *style;
if (PyType_Ready(&Dialect_Type) < 0)
return NULL;