summaryrefslogtreecommitdiff
path: root/Modules/mathmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-25 13:25:52 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-25 13:25:52 +0200
commit3f19a274c28567afb39ba46ea8a2ebdeab816b0b (patch)
treeb455925dd27f3d6e421d9fca9f3295b988a24254 /Modules/mathmodule.c
parentb0cbde5d42f12b3aca11b87c017b3c60a26be4fd (diff)
parentc8486579312320fd09c56ce9fce3da7ea0ffd132 (diff)
downloadcpython-3f19a274c28567afb39ba46ea8a2ebdeab816b0b.tar.gz
Issue #27867: Function PySlice_GetIndicesEx() is replaced with a macro if
Py_LIMITED_API is not set or set to the value between 0x03050400 and 0x03060000 (not including) or 0x03060100 or higher.
Diffstat (limited to 'Modules/mathmodule.c')
-rw-r--r--Modules/mathmodule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index b945bd6427..95ea4f7fef 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -875,7 +875,7 @@ math_1_to_int(PyObject *arg, double (*func) (double), int can_overflow)
}
static PyObject *
-math_2(PyObject *args, double (*func) (double, double), char *funcname)
+math_2(PyObject *args, double (*func) (double, double), const char *funcname)
{
PyObject *ox, *oy;
double x, y, r;
@@ -1672,7 +1672,7 @@ PyDoc_STRVAR(math_modf_doc,
in that int is larger than PY_SSIZE_T_MAX. */
static PyObject*
-loghelper(PyObject* arg, double (*func)(double), char *funcname)
+loghelper(PyObject* arg, double (*func)(double), const char *funcname)
{
/* If it is int, do it ourselves. */
if (PyLong_Check(arg)) {
@@ -2144,6 +2144,7 @@ PyInit_math(void)
PyModule_AddObject(m, "pi", PyFloat_FromDouble(Py_MATH_PI));
PyModule_AddObject(m, "e", PyFloat_FromDouble(Py_MATH_E));
+ PyModule_AddObject(m, "tau", PyFloat_FromDouble(Py_MATH_TAU)); /* 2pi */
PyModule_AddObject(m, "inf", PyFloat_FromDouble(m_inf()));
#if !defined(PY_NO_SHORT_FLOAT_REPR) || defined(Py_NAN)
PyModule_AddObject(m, "nan", PyFloat_FromDouble(m_nan()));