diff options
author | Eric Smith <eric@trueblade.com> | 2009-04-25 21:40:15 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2009-04-25 21:40:15 (GMT) |
commit | 068f06568be288b8628a4e24118503e4d9b7af1b (patch) | |
tree | e1d01c08ed08489c994e7cbf167fd703c7f2c64e /Modules/cPickle.c | |
parent | dfcffd40447de8e04376f8946fb71a9c16151563 (diff) | |
download | cpython-068f06568be288b8628a4e24118503e4d9b7af1b.zip cpython-068f06568be288b8628a4e24118503e4d9b7af1b.tar.gz cpython-068f06568be288b8628a4e24118503e4d9b7af1b.tar.bz2 |
Issue #5835, deprecate PyOS_ascii_formatd.
If anyone wants to clean up the documentation, feel free. It's my first documentation foray, and it's not that great.
Will port to py3k with a different strategy.
Diffstat (limited to 'Modules/cPickle.c')
-rw-r--r-- | Modules/cPickle.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c index fb13ba1..6c7ed99 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -1166,7 +1166,8 @@ save_float(Picklerobject *self, PyObject *args) else { char c_str[250]; c_str[0] = FLOAT; - PyOS_ascii_formatd(c_str + 1, sizeof(c_str) - 2, "%.17g", x); + _PyOS_double_to_string(c_str + 1, sizeof(c_str) - 2, x, 'g', + 17, 0, NULL); /* Extend the formatted string with a newline character */ strcat(c_str, "\n"); |