summaryrefslogtreecommitdiff
path: root/Python/mystrtoul.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-04-16 14:54:27 -0700
committerBenjamin Peterson <benjamin@python.org>2016-04-16 14:54:27 -0700
commite10c2d6ab9e3ee5ebeca76a34dd93d624b579da1 (patch)
tree2a0216a274628659694e875dd03ffe65ab5344ad /Python/mystrtoul.c
parent52fdbac919f35a276a2924a1dfe8b71c2b497db2 (diff)
parent88a7179f982d5982844e7e57c303c2df1f5e7854 (diff)
downloadcpython-e10c2d6ab9e3ee5ebeca76a34dd93d624b579da1.tar.gz
merge 3.5 (#26659)
Diffstat (limited to 'Python/mystrtoul.c')
-rw-r--r--Python/mystrtoul.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/mystrtoul.c b/Python/mystrtoul.c
index 98429d4b42..a85790e1bf 100644
--- a/Python/mystrtoul.c
+++ b/Python/mystrtoul.c
@@ -17,7 +17,7 @@
* smallmax[base] is the largest unsigned long i such that
* i * base doesn't overflow unsigned long.
*/
-static unsigned long smallmax[] = {
+static const unsigned long smallmax[] = {
0, /* bases 0 and 1 are invalid */
0,
ULONG_MAX / 2,
@@ -62,14 +62,14 @@ static unsigned long smallmax[] = {
* Note that this is pessimistic if sizeof(long) > 4.
*/
#if SIZEOF_LONG == 4
-static int digitlimit[] = {
+static const int digitlimit[] = {
0, 0, 32, 20, 16, 13, 12, 11, 10, 10, /* 0 - 9 */
9, 9, 8, 8, 8, 8, 8, 7, 7, 7, /* 10 - 19 */
7, 7, 7, 7, 6, 6, 6, 6, 6, 6, /* 20 - 29 */
6, 6, 6, 6, 6, 6, 6}; /* 30 - 36 */
#elif SIZEOF_LONG == 8
/* [int(math.floor(math.log(2**64, i))) for i in range(2, 37)] */
-static int digitlimit[] = {
+static const int digitlimit[] = {
0, 0, 64, 40, 32, 27, 24, 22, 21, 20, /* 0 - 9 */
19, 18, 17, 17, 16, 16, 16, 15, 15, 15, /* 10 - 19 */
14, 14, 14, 14, 13, 13, 13, 13, 13, 13, /* 20 - 29 */