Skip to content

Commit e731354

Browse files
committed
Address code review
1 parent d644555 commit e731354

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Python/ceval_macros.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,15 +359,17 @@ static void dtrace_function_return(_PyInterpreterFrame *);
359359
* so there is no need to update them. */
360360
#define ADVANCE_ADAPTIVE_COUNTER(COUNTER) \
361361
do { \
362-
if (!backoff_counter_is_unreachable((COUNTER))) { \
363-
(COUNTER) = advance_backoff_counter((COUNTER)); \
362+
_Py_BackoffCounter cnt = (COUNTER); \
363+
if (!backoff_counter_is_unreachable(cnt)) { \
364+
(COUNTER) = advance_backoff_counter(cnt); \
364365
} \
365366
} while (0);
366367

367368
#define PAUSE_ADAPTIVE_COUNTER(COUNTER) \
368369
do { \
369-
if (!backoff_counter_is_unreachable((COUNTER))) { \
370-
(COUNTER) = pause_backoff_counter((COUNTER)); \
370+
_Py_BackoffCounter cnt = (COUNTER); \
371+
if (!backoff_counter_is_unreachable(cnt)) { \
372+
(COUNTER) = pause_backoff_counter(cnt); \
371373
} \
372374
} while (0);
373375
#else

0 commit comments

Comments
 (0)