From: Benjamin Peterson Date: Thu, 8 Sep 2016 01:09:22 +0000 (-0700) Subject: make sure expected values are interpreted as doubles X-Git-Tag: v3.6.0b1~308 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f4b247a1d40dd64596fc7aad3e38f6f238efb34;p=thirdparty%2FPython%2Fcpython.git make sure expected values are interpreted as doubles --- diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 87cf4b271a6f..7d7fa40be25f 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; \ }