summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-09-09 22:28:09 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-09-09 22:28:09 +0200
commitce6aa749b40d39c8eb82463068cc58f974fbfdf5 (patch)
treeb508b4db7ae24053873dd4fa278c3f3a4c7c2d64
parent17ebaa93d42b396a6538c8e48dfdae70bac489ee (diff)
downloadcpython-git-ce6aa749b40d39c8eb82463068cc58f974fbfdf5.tar.gz
Make _PyTime_RoundHalfEven() private again
-rw-r--r--Include/pytime.h5
-rw-r--r--Python/pytime.c4
2 files changed, 3 insertions, 6 deletions
diff --git a/Include/pytime.h b/Include/pytime.h
index 54a0cc4db8..5de756a761 100644
--- a/Include/pytime.h
+++ b/Include/pytime.h
@@ -44,11 +44,6 @@ PyAPI_FUNC(PyObject *) _PyLong_FromTime_t(
PyAPI_FUNC(time_t) _PyLong_AsTime_t(
PyObject *obj);
-/* Round to nearest with ties going to nearest even integer
- (_PyTime_ROUND_HALF_EVEN) */
-PyAPI_FUNC(double) _PyTime_RoundHalfEven(
- double x);
-
/* Convert a number of seconds, int or float, to time_t. */
PyAPI_FUNC(int) _PyTime_ObjectToTime_t(
PyObject *obj,
diff --git a/Python/pytime.c b/Python/pytime.c
index 9f7ee2d0ed..37dfabbb0a 100644
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -60,7 +60,9 @@ _PyLong_FromTime_t(time_t t)
#endif
}
-double
+/* Round to nearest with ties going to nearest even integer
+ (_PyTime_ROUND_HALF_EVEN) */
+static double
_PyTime_RoundHalfEven(double x)
{
double rounded = round(x);