Refactor to remove duplicated nan/inf parsing code in

pystrtod.c, floatobject.c and dtoa.c.
This commit is contained in:
Mark Dickinson 2009-05-20 22:05:25 +00:00
parent 4db6ff683d
commit bd16edd305
5 changed files with 85 additions and 125 deletions

View file

@ -21,6 +21,8 @@ PyAPI_FUNC(char *) PyOS_double_to_string(double val,
int flags,
int *type);
PyAPI_FUNC(double) _Py_parse_inf_or_nan(const char *p, char **endptr);
/* PyOS_double_to_string's "flags" parameter can be set to 0 or more of: */
#define Py_DTSF_SIGN 0x01 /* always add the sign */