mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #23096: Pickle representation of floats with protocol 0 now is the same
for both Python and C implementations.
This commit is contained in:
parent
d362c21264
commit
c86ca26d32
2 changed files with 4 additions and 1 deletions
|
@ -1979,7 +1979,7 @@ save_float(PicklerObject *self, PyObject *obj)
|
|||
if (_Pickler_Write(self, &op, 1) < 0)
|
||||
goto done;
|
||||
|
||||
buf = PyOS_double_to_string(x, 'g', 17, 0, NULL);
|
||||
buf = PyOS_double_to_string(x, 'r', 0, Py_DTSF_ADD_DOT_0, NULL);
|
||||
if (!buf) {
|
||||
PyErr_NoMemory();
|
||||
goto done;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue