diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-09-08 01:09:22 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-09-08 01:09:22 (GMT) |
commit | 8f4b247a1d40dd64596fc7aad3e38f6f238efb34 (patch) | |
tree | c7d58c952ceded51d412be148c619734f9cdfe1d | |
parent | eb35eac3bc624d49fa64c4e794fc39cce516ee4b (diff) | |
download | cpython-8f4b247a1d40dd64596fc7aad3e38f6f238efb34.zip cpython-8f4b247a1d40dd64596fc7aad3e38f6f238efb34.tar.gz cpython-8f4b247a1d40dd64596fc7aad3e38f6f238efb34.tar.bz2 |
make sure expected values are interpreted as doubles
-rw-r--r-- | Modules/_testcapimodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 87cf4b2..7d7fa40 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -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; \ } |