Mercurial > cpython-lru_cache-weakref
diff Modules/mathmodule.c @ 62684:3304dc56dda4
Style/consistency nit: make math_floor and math_ceil code look the same.
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Fri, 02 Jul 2010 16:05:15 +0000 |
| parents | 35370d7236c9 |
| children | e655849e79c6 |
line wrap: on
line diff
--- a/Modules/mathmodule.c Fri Jul 02 15:57:50 2010 +0000 +++ b/Modules/mathmodule.c Fri Jul 02 16:05:15 2010 +0000 @@ -841,7 +841,7 @@ static PyObject * math_ceil(PyObject *self, PyObject *number) { static PyObject *ceil_str = NULL; - PyObject *method; + PyObject *method, *result; method = _PyObject_LookupSpecial(number, "__ceil__", &ceil_str); if (method == NULL) { @@ -849,11 +849,9 @@ return NULL; return math_1_to_int(number, ceil, 0); } - else { - PyObject *result = PyObject_CallFunctionObjArgs(method, NULL); - Py_DECREF(method); - return result; - } + result = PyObject_CallFunctionObjArgs(method, NULL); + Py_DECREF(method); + return result; } PyDoc_STRVAR(math_ceil_doc,
