From 8f4b247a1d40dd64596fc7aad3e38f6f238efb34 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 7 Sep 2016 18:09:22 -0700 Subject: make sure expected values are interpreted as doubles --- Modules/_testcapimodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; \ } -- cgit v0.12