Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce6aa74

Browse files
committed
Make _PyTime_RoundHalfEven() private again
1 parent 17ebaa9 commit ce6aa74

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

Include/pytime.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ PyAPI_FUNC(PyObject *) _PyLong_FromTime_t(
4444
PyAPI_FUNC(time_t) _PyLong_AsTime_t(
4545
PyObject *obj);
4646

47-
/* Round to nearest with ties going to nearest even integer
48-
(_PyTime_ROUND_HALF_EVEN) */
49-
PyAPI_FUNC(double) _PyTime_RoundHalfEven(
50-
double x);
51-
5247
/* Convert a number of seconds, int or float, to time_t. */
5348
PyAPI_FUNC(int) _PyTime_ObjectToTime_t(
5449
PyObject *obj,

Python/pytime.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ _PyLong_FromTime_t(time_t t)
6060
#endif
6161
}
6262

63-
double
63+
/* Round to nearest with ties going to nearest even integer
64+
(_PyTime_ROUND_HALF_EVEN) */
65+
static double
6466
_PyTime_RoundHalfEven(double x)
6567
{
6668
double rounded = round(x);

0 commit comments

Comments
 (0)