From 3e09f43e065aefc7b69dcaac5fdd6c952d2e8be0 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Fri, 17 Apr 2009 08:41:23 +0000 Subject: Make sure that marshal and pickle continue to output 17 digits of precision for floats. --- Python/marshal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Python') diff --git a/Python/marshal.c b/Python/marshal.c index 0d551322d1..911d2e150a 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -237,7 +237,7 @@ w_object(PyObject *v, WFILE *p) } else { char *buf = PyOS_double_to_string(PyFloat_AS_DOUBLE(v), - 'r', 0, 0, NULL); + 'g', 17, 0, NULL); if (!buf) return; n = strlen(buf); @@ -269,7 +269,7 @@ w_object(PyObject *v, WFILE *p) char *buf; w_byte(TYPE_COMPLEX, p); buf = PyOS_double_to_string(PyComplex_RealAsDouble(v), - 'r', 0, 0, NULL); + 'g', 17, 0, NULL); if (!buf) return; n = strlen(buf); @@ -277,7 +277,7 @@ w_object(PyObject *v, WFILE *p) w_string(buf, (int)n, p); PyMem_Free(buf); buf = PyOS_double_to_string(PyComplex_ImagAsDouble(v), - 'r', 0, 0, NULL); + 'g', 17, 0, NULL); if (!buf) return; n = strlen(buf); -- cgit v1.2.1