diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-25 17:53:18 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-12-25 17:53:18 (GMT) |
| commit | 2d06e8445587d9b4d0bf79bdb08ab4743b780249 (patch) | |
| tree | 9708850d5ae4855466435687cf36f162834d2694 /Modules/_struct.c | |
| parent | ea8c43152fdaa508ec189062b09a470f1b4ba535 (diff) | |
| download | cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.zip cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.tar.gz cpython-2d06e8445587d9b4d0bf79bdb08ab4743b780249.tar.bz2 | |
Issue #25923: Added the const qualifier to static constant arrays.
Diffstat (limited to 'Modules/_struct.c')
| -rw-r--r-- | Modules/_struct.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c index b61f9f6..b18c71d 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -723,7 +723,7 @@ np_void_p(char *p, PyObject *v, const formatdef *f) return 0; } -static formatdef native_table[] = { +static const formatdef native_table[] = { {'x', sizeof(char), 0, NULL}, {'b', sizeof(char), 0, nu_byte, np_byte}, {'B', sizeof(char), 0, nu_ubyte, np_ubyte}, @@ -2280,7 +2280,7 @@ PyInit__struct(void) /* Check endian and swap in faster functions */ { - formatdef *native = native_table; + const formatdef *native = native_table; formatdef *other, *ptr; #if PY_LITTLE_ENDIAN other = lilendian_table; |
