[issue7117] Backport py3k float repr to trunk

Eric Smith report at bugs.python.org
Sat Oct 24 19:04:41 CEST 2009


Eric Smith <eric at trueblade.com> added the comment:

I think the next step on my side is to remove _PyOS_double_to_string,
and make all of the internal code call PyOS_double_to_string. The
distinction is that _PyOS_double_to_string gets passed a buffer and
length, but  PyOS_double_to_string returns allocated memory that must be
freed. David Gay's code (_Py_dg_dtoa) returns allocated memory, so
that's the easiest interface to propagate internally.

That's the approach we used in the py3k branch. I'll start work on it.
So Mark's work should be mostly config stuff and hooking up Gay's code
to PyOS_double_to_string. I think it will basically match the py3k version.

The existing _PyOS_double_to_string will become the basis for the
fallback code for use when PY_NO_SHORT_FLOAT_REPR is defined (and it
will then be renamed PyOS_double_to_string and have its signature
changed to match).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7117>
_______________________________________


More information about the Python-bugs-list mailing list