summaryrefslogtreecommitdiffstats
path: root/Modules
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 /Modules
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 'Modules')
-rw-r--r--Modules/_pickle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 20ab525..e9c4a76 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -1025,7 +1025,7 @@ save_float(PicklerObject *self, PyObject *obj)
if (pickler_write(self, &op, 1) < 0)
goto done;
- buf = PyOS_double_to_string(x, 'r', 0, 0, NULL);
+ buf = PyOS_double_to_string(x, 'g', 17, 0, NULL);
if (!buf) {
PyErr_NoMemory();
goto done;