8000 bpo-41710: Fix building pytime.c on Windows (GH-28644) · python/cpython@0231b6d · GitHub
[go: up one dir, main page]

Skip to content

Commit 0231b6d

Browse files
authored
bpo-41710: Fix building pytime.c on Windows (GH-28644)
1 parent d62d925 commit 0231b6d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Python/pytime.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pytime_as_nanoseconds(_PyTime_t t)
7474

7575

7676
// Compute t + t2. Clamp to [_PyTime_MIN; _PyTime_MAX] on overflow.
77-
static inline _PyTime_t
77+
static inline int
7878
pytime_add(_PyTime_t *t, _PyTime_t t2)
7979
{
8080
if (t2 > 0 && *t > _PyTime_MAX - t2) {
@@ -101,7 +101,7 @@ _PyTime_check_mul_overflow(_PyTime_t a, _PyTime_t b)
101101

102102

103103
// Compute t * k. Clamp to [_PyTime_MIN; _PyTime_MAX] on overflow.
104-
static inline _PyTime_t
104+
static inline int
105105
pytime_mul(_PyTime_t *t, _PyTime_t k)
106106
{
107107
assert(k > 0);
@@ -1162,13 +1162,13 @@ py_win_perf_counter_frequency(LONGLONG *pfrequency, int raise)
11621162

11631163

11641164
static int
1165-
py_get_win_perf_counter(_PyTime_t *tp, _Py_clock_info_t *info, int raise)
1165+
py_get_win_perf_counter(_PyTime_t *tp, _Py_clock_info_t *info, int raise_exc)
11661166
{
11671167
assert(info == NULL || raise_exc);
11681168

11691169
static LONGLONG frequency = 0;
11701170
if (frequency == 0) {
1171-
if (py_win_perf_counter_frequency(&frequency, raise) < 0) {
1171+
if (py_win_perf_counter_frequency(&frequency, raise_exc) < 0) {
11721172
return -1;
11731173
}
11741174
}
@@ -1194,7 +1194,7 @@ py_get_win_perf_counter(_PyTime_t *tp, _Py_clock_info_t *info, int raise)
11941194
*tp = pytime_from_nanoseconds(ns);
11951195
return 0;
11961196
}
1197-
#endif
1197+
#endif // MS_WINDOWS
11981198

11991199

12001200
int

0 commit comments

Comments
 (0)
0