summaryrefslogtreecommitdiff
path: root/Python/pystrtod.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-01 23:00:22 +0200
committerChristian Heimes <christian@cheimes.de>2013-07-01 23:00:22 +0200
commit9dc893c954b626685fc5bb12a040e22a41a8958d (patch)
treec42918d40b287e76ae260b4c402ce62ed813087d /Python/pystrtod.c
parentd71dc179c59f0a6e74087ecea134164f0e184ee8 (diff)
parent691afb4d9f2a095f89c6e4011807a185fa661bb7 (diff)
downloadcpython-9dc893c954b626685fc5bb12a040e22a41a8958d.tar.gz
Issue #18339: use with self.assertRaises() to make test case more readable
Diffstat (limited to 'Python/pystrtod.c')
-rw-r--r--Python/pystrtod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index 4ab8f08d22..f8d3b35b9f 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -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 <