diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-10-24 12:13:30 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-10-24 12:13:30 (GMT) |
commit | bb28285ea2f01e97a26bc595d49da43fbee62913 (patch) | |
tree | 67200f4553cf316577993cfc104153c2f41e759c /Include | |
parent | f98a267be374508c04faa4200f552804399faed8 (diff) | |
download | cpython-bb28285ea2f01e97a26bc595d49da43fbee62913.zip cpython-bb28285ea2f01e97a26bc595d49da43fbee62913.tar.gz cpython-bb28285ea2f01e97a26bc595d49da43fbee62913.tar.bz2 |
Issue #7117: Prepare for backport of py3k float repr.
Add the Python/dtoa.c file containing the main algorithms;
add corresponding include file and include in Python.h;
include license information for Python/dtoa.c;
add dtoa.c and dtoa.h to Makefile.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/Python.h | 1 | ||||
-rw-r--r-- | Include/dtoa.h | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Include/Python.h b/Include/Python.h index 9e140a5..eac9f48 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -137,6 +137,7 @@ #include "pyctype.h" #include "pystrtod.h" #include "pystrcmp.h" +#include "dtoa.h" /* _Py_Mangle is defined in compile.c */ PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name); diff --git a/Include/dtoa.h b/Include/dtoa.h new file mode 100644 index 0000000..9b434b7 --- /dev/null +++ b/Include/dtoa.h @@ -0,0 +1,15 @@ +#ifndef PY_NO_SHORT_FLOAT_REPR +#ifdef __cplusplus +extern "C" { +#endif + +PyAPI_FUNC(double) _Py_dg_strtod(const char *str, char **ptr); +PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits, + int *decpt, int *sign, char **rve); +PyAPI_FUNC(void) _Py_dg_freedtoa(char *s); + + +#ifdef __cplusplus +} +#endif +#endif |