From ce68c19ee7fc27eea1b1a0abbfab316d93876ed4 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 15 Mar 2014 11:49:49 -0500 Subject: [PATCH 1/2] remove unused zero constants --- Modules/_decimal/_decimal.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index ac20308953a..ea5253efb67 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -3928,9 +3928,6 @@ nm_mpd_qdivmod(PyObject *v, PyObject *w) return ret; } -static mpd_uint_t data_zero[1] = {0}; -static const mpd_t zero = {MPD_STATIC|MPD_CONST_DATA, 0, 1, 1, 1, data_zero}; - static PyObject * nm_mpd_qpow(PyObject *base, PyObject *exp, PyObject *mod) { From c77e7a4f233453a4e39fc7f61c72e6ef3877dcd1 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 15 Mar 2014 11:50:00 -0500 Subject: [PATCH 2/2] only define zero constant when it is used --- Modules/_math.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/_math.c b/Modules/_math.c index fe75a36ec51..a14ff0605f4 100644 --- a/Modules/_math.c +++ b/Modules/_math.c @@ -22,7 +22,9 @@ static const double ln2 = 6.93147180559945286227E-01; static const double two_pow_m28 = 3.7252902984619141E-09; /* 2**-28 */ static const double two_pow_p28 = 268435456.0; /* 2**28 */ +#ifndef Py_NAN static const double zero = 0.0; +#endif /* acosh(x) * Method :