Mercurial > cpython-lru_cache-weakref
diff Objects/floatobject.c @ 17707:fe4c1034b480 legacy-trunk
SF bug #422177: Results from .pyc differs from .py
Store floats and doubles to full precision in marshal.
Test that floats read from .pyc/.pyo closely match those read from .py.
Declare PyFloat_AsString() in floatobject header file.
Add new PyFloat_AsReprString() API function.
Document the functions declared in floatobject.h.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Tue, 08 May 2001 15:19:57 +0000 |
| parents | 65a638a24f7e |
| children | a8575f358b9f |
line wrap: on
line diff
--- a/Objects/floatobject.c Tue May 08 14:20:11 2001 +0000 +++ b/Objects/floatobject.c Tue May 08 15:19:57 2001 +0000 @@ -311,6 +311,12 @@ PyFloat_AsStringEx(buf, v, PREC_STR); } +void +PyFloat_AsReprString(char *buf, PyFloatObject *v) +{ + PyFloat_AsStringEx(buf, v, PREC_REPR); +} + /* ARGSUSED */ static int float_print(PyFloatObject *v, FILE *fp, int flags)
