[Python-checkins] cpython: Make _PyTime_RoundHalfEven() private again

victor.stinner python-checkins at python.org
Wed Sep 9 23:48:20 CEST 2015


https://hg.python.org/cpython/rev/dae40b1468fb
changeset:   97836:dae40b1468fb
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Sep 09 22:28:09 2015 +0200
summary:
  Make _PyTime_RoundHalfEven() private again

files:
  Include/pytime.h |  5 -----
  Python/pytime.c  |  4 +++-
  2 files changed, 3 insertions(+), 6 deletions(-)


diff --git a/Include/pytime.h b/Include/pytime.h
--- a/Include/pytime.h
+++ b/Include/pytime.h
@@ -44,11 +44,6 @@
 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
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -60,7 +60,9 @@
 #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);

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list