summaryrefslogtreecommitdiff
path: root/Python/pystrtod.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-06-27 14:26:15 -0500
committerBenjamin Peterson <benjamin@python.org>2015-06-27 14:26:15 -0500
commitdcfaff6331ae24a19a2c9db3b7c8ba71fb5e418f (patch)
treee5a5131cd0aa8d193a829e94cc5cf6d9d43bdcd1 /Python/pystrtod.c
parentd8c55459f1bd6ade7cd2b16fe667c84a46f4fd48 (diff)
parent5942fb553b4d2bed2f760e87bf8fab8111eb3eed (diff)
downloadcpython-dcfaff6331ae24a19a2c9db3b7c8ba71fb5e418f.tar.gz
merge 3.3
Diffstat (limited to 'Python/pystrtod.c')
-rw-r--r--Python/pystrtod.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index 4ab8f08d22..209c9086c8 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -164,7 +164,7 @@ static double
_PyOS_ascii_strtod(const char *nptr, char **endptr)
{
char *fail_pos;
- double val = -1.0;
+ double val;
struct lconv *locale_data;
const char *decimal_point;
size_t decimal_point_len;
@@ -325,7 +325,7 @@ _PyOS_ascii_strtod(const char *nptr, char **endptr)
On overflow (e.g., when trying to convert '1e500' on an IEEE 754 machine),
if overflow_exception is NULL then +-Py_HUGE_VAL is returned, and no Python
- exception is raised. Otherwise, overflow_exception should point to a
+ exception is raised. Otherwise, overflow_exception should point to
a Python exception, this exception will be raised, -1.0 will be returned,
and *endptr will point just past the end of the converted value.
@@ -923,7 +923,7 @@ static char *uc_float_strings[] = {
static char *
format_float_short(double d, char format_code,
- int mode, Py_ssize_t precision,
+ int mode, int precision,
int always_add_sign, int add_dot_0_if_integer,
int use_alt_formatting, char **float_strings, int *type)
{
@@ -1059,7 +1059,7 @@ format_float_short(double d, char format_code,
/* if using an exponent, reset decimal point position to 1 and adjust
exponent accordingly.*/
if (use_exp) {
- exp = decpt - 1;
+ exp = (int)decpt - 1;
decpt = 1;
}
/* ensure vdigits_start < decpt <= vdigits_end, or vdigits_start <