mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Issue #25923: Added the const qualifier to static constant arrays.
This commit is contained in:
parent
ea8c43152f
commit
2d06e84455
44 changed files with 139 additions and 134 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue