summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-05-08 15:19:57 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-05-08 15:19:57 (GMT)
commit72f98e9b838ce73142e3bb89c4c7fde3266d475e (patch)
treeee5028c0b885ff1d7bd6d0efb5d842de50efcec6 /Objects/floatobject.c
parent569c09c013b9fd88dd5f815a91ab1af4026d8a86 (diff)
downloadcpython-72f98e9b838ce73142e3bb89c4c7fde3266d475e.zip
cpython-72f98e9b838ce73142e3bb89c4c7fde3266d475e.tar.gz
cpython-72f98e9b838ce73142e3bb89c4c7fde3266d475e.tar.bz2
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.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index b129798..2f17d02 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -311,6 +311,12 @@ PyFloat_AsString(char *buf, PyFloatObject *v)
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)