summaryrefslogtreecommitdiff
path: root/Python/pystrtod.c
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-05-28 01:07:08 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-05-28 01:07:08 +0000
commit30a919d162fc7f5072de7fecde86da3d9b43d3e8 (patch)
tree32f34d92e32755208fab34fcc543a8996b0039d3 /Python/pystrtod.c
parentf04b85e6c166e9f31aa167d63e92c49595c858d6 (diff)
parent1f1268c0bc93629b7abc16d8af9cf997c32a947b (diff)
downloadcpython-30a919d162fc7f5072de7fecde86da3d9b43d3e8.tar.gz
Issue #20699: Merge io bytes-like fixes from 3.5
Diffstat (limited to 'Python/pystrtod.c')
-rw-r--r--Python/pystrtod.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index 209c9086c8..5f3af92dca 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -881,12 +881,12 @@ PyAPI_FUNC(char *) PyOS_double_to_string(double val,
#define OFS_E 2
/* The lengths of these are known to the code below, so don't change them */
-static char *lc_float_strings[] = {
+static const char * const lc_float_strings[] = {
"inf",
"nan",
"e",
};
-static char *uc_float_strings[] = {
+static const char * const uc_float_strings[] = {
"INF",
"NAN",
"E",
@@ -925,7 +925,8 @@ static char *
format_float_short(double d, char format_code,
int mode, int precision,
int always_add_sign, int add_dot_0_if_integer,
- int use_alt_formatting, char **float_strings, int *type)
+ int use_alt_formatting, const char * const *float_strings,
+ int *type)
{
char *buf = NULL;
char *p = NULL;
@@ -1176,7 +1177,7 @@ PyAPI_FUNC(char *) PyOS_double_to_string(double val,
int flags,
int *type)
{
- char **float_strings = lc_float_strings;
+ const char * const *float_strings = lc_float_strings;
int mode;
/* Validate format_code, and map upper and lower case. Compute the