[Python-checkins] r71232 - python/branches/py3k-short-float-repr/Python/pystrtod.c

mark.dickinson python-checkins at python.org
Sun Apr 5 15:06:13 CEST 2009


Author: mark.dickinson
Date: Sun Apr  5 15:06:12 2009
New Revision: 71232

Log:
Enable ADD_DOT_0 flag for 'g' mode.


Modified:
   python/branches/py3k-short-float-repr/Python/pystrtod.c

Modified: python/branches/py3k-short-float-repr/Python/pystrtod.c
==============================================================================
--- python/branches/py3k-short-float-repr/Python/pystrtod.c	(original)
+++ python/branches/py3k-short-float-repr/Python/pystrtod.c	Sun Apr  5 15:06:12 2009
@@ -608,6 +608,10 @@
 	case 'g':
 		if (decpt <= -4 || decpt > precision)
 			use_exp = 1;
+		/* assumes that not both of add_dot_0_if_integer and
+		   use_alt_formatting are set */
+		else if (add_dot_0_if_integer)
+			min_digits = decpt + 1;
 		if (use_alt_formatting)
 			min_digits = precision;
 		break;


More information about the Python-checkins mailing list