summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-08 01:09:22 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-09-08 01:09:22 (GMT)
commit8f4b247a1d40dd64596fc7aad3e38f6f238efb34 (patch)
treec7d58c952ceded51d412be148c619734f9cdfe1d /Modules
parenteb35eac3bc624d49fa64c4e794fc39cce516ee4b (diff)
downloadcpython-8f4b247a1d40dd64596fc7aad3e38f6f238efb34.zip
cpython-8f4b247a1d40dd64596fc7aad3e38f6f238efb34.tar.gz
cpython-8f4b247a1d40dd64596fc7aad3e38f6f238efb34.tar.bz2
make sure expected values are interpreted as doubles
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testcapimodule.c2
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; \
}