diff --git a/pandas/src/parser/tokenizer.c b/pandas/src/parser/tokenizer.c index f817b202632e5..9a7303b6874db 100644 --- a/pandas/src/parser/tokenizer.c +++ b/pandas/src/parser/tokenizer.c @@ -2292,7 +2292,11 @@ double precise_xstrtod(const char *str, char **endptr, char decimal, double round_trip(const char *p, char **q, char decimal, char sci, char tsep, int skip_trailing) { +#if PY_VERSION_HEX >= 0x02070000 + return PyOS_string_to_double(p, q, 0); +#else return strtod(p, q); +#endif } /* diff --git a/pandas/src/parser/tokenizer.h b/pandas/src/parser/tokenizer.h index 1ad7106ef123f..0947315fbe6b7 100644 --- a/pandas/src/parser/tokenizer.h +++ b/pandas/src/parser/tokenizer.h @@ -12,6 +12,7 @@ See LICENSE for the license #ifndef _PARSER_COMMON_H_ #define _PARSER_COMMON_H_ +#include "Python.h" #include #include #include