Skip to content

Commit

Permalink
Don't use designated initializers in headers
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed May 4, 2024
1 parent 5f54758 commit 4c1049b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Include/internal/pycore_backoff.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,18 @@ make_backoff_counter(uint16_t value, uint16_t backoff)
{
assert(backoff <= 15);
assert(value <= 0xFFF);
return (_Py_BackoffCounter){.backoff = backoff, .value = value};
_Py_BackoffCounter result;
result.value = value;
result.backoff = backoff;
return result;
}

static inline _Py_BackoffCounter
forge_backoff_counter(uint16_t counter)
{
return (_Py_BackoffCounter){.as_counter = counter};
_Py_BackoffCounter result;
result.as_counter = counter;
return result;
}

static inline _Py_BackoffCounter
Expand Down

0 comments on commit 4c1049b

Please sign in to comment.