make sure expected values are interpreted as doubles

This commit is contained in:
Benjamin Peterson 2016-09-07 18:09:22 -07:00
parent eb35eac3bc
commit 8f4b247a1d
1 changed files with 1 additions and 1 deletions

View File

@ -2309,7 +2309,7 @@ test_string_to_double(PyObject *self) {
result = PyOS_string_to_double(STR, NULL, NULL); \
if (result == -1.0 && PyErr_Occurred()) \
return NULL; \
if (result != expected) { \
if (result != (double)expected) { \
msg = "conversion of " STR " to float failed"; \
goto fail; \
}