summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-04-17 08:41:23 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-04-17 08:41:23 (GMT)
commit3e09f43e065aefc7b69dcaac5fdd6c952d2e8be0 (patch)
tree908a613cad57845539a745330d93e5b554d6955d /Python/marshal.c
parent8648e501d8b9ed23f543d17d8e8c151cbec19566 (diff)
downloadcpython-3e09f43e065aefc7b69dcaac5fdd6c952d2e8be0.zip
cpython-3e09f43e065aefc7b69dcaac5fdd6c952d2e8be0.tar.gz
cpython-3e09f43e065aefc7b69dcaac5fdd6c952d2e8be0.tar.bz2
Make sure that marshal and pickle continue to output 17
digits of precision for floats.
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index 0d55132..911d2e1 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);