summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-11-20 02:51:30 +0100
committerGitHub <noreply@github.com>2019-11-20 02:51:30 +0100
commitbe143ec99674ba38c5811f34cdb85ef39c2dc8f8 (patch)
treefb6f916b483c7dd7506d92899604cd17a4344e0d /Python/bltinmodule.c
parentbpo-36710: Add PyInterpreterState.runtime field (GH-17270) (diff)
downloadcpython-be143ec99674ba38c5811f34cdb85ef39c2dc8f8.tar.gz
cpython-be143ec99674ba38c5811f34cdb85ef39c2dc8f8.tar.bz2
cpython-be143ec99674ba38c5811f34cdb85ef39c2dc8f8.zip
bpo-38835: Don't use PyFPE_START_PROTECT and PyFPE_END_PROTECT (GH-17231)
The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros are empty: they have been doing nothing for the last year (since commit 735ae8d139a673b30b321dc10acfd3d14f0d633b), so stop using them.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 4470310a84e..34267685be2 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -2385,9 +2385,7 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start)
return PyFloat_FromDouble(f_result);
}
if (PyFloat_CheckExact(item)) {
- PyFPE_START_PROTECT("add", Py_DECREF(item); Py_DECREF(iter); return 0)
f_result += PyFloat_AS_DOUBLE(item);
- PyFPE_END_PROTECT(f_result)
Py_DECREF(item);
continue;
}
@@ -2396,9 +2394,7 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start)
int overflow;
value = PyLong_AsLongAndOverflow(item, &overflow);
if (!overflow) {
- PyFPE_START_PROTECT("add", Py_DECREF(item); Py_DECREF(iter); return 0)
f_result += (double)value;
- PyFPE_END_PROTECT(f_result)
Py_DECREF(item);
continue;
}