[Python-checkins] cpython: make sure expected values are interpreted as doubles
benjamin.peterson
python-checkins at python.org
Wed Sep 7 21:09:45 EDT 2016
https://hg.python.org/cpython/rev/a6be890d4c88
changeset: 103279:a6be890d4c88
parent: 103277:f1013d826fde
user: Benjamin Peterson <benjamin at python.org>
date: Wed Sep 07 18:09:22 2016 -0700
summary:
make sure expected values are interpreted as doubles
files:
Modules/_testcapimodule.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2309,7 +2309,7 @@
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; \
}
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list