Mailing List Archive

gh-117549: Match declaration order for _Py_BackoffCounter initializer (#117551)
https://github.com/python/cpython/commit/b5e60918afa53dfd59ad26a9f4b5207a9b304bc1
commit: b5e60918afa53dfd59ad26a9f4b5207a9b304bc1
branch: main
author: Michael Droettboom <mdboom@gmail.com>
committer: gvanrossum <gvanrossum@gmail.com>
date: 2024-04-04T14:14:35-07:00
summary:

gh-117549: Match declaration order for _Py_BackoffCounter initializer (#117551)

Otherwise it might not compile with C++ (or certain C compilers/flags?).

files:
M Include/internal/pycore_backoff.h

diff --git a/Include/internal/pycore_backoff.h b/Include/internal/pycore_backoff.h
index 5d93c889e84976..decf92bc419c04 100644
--- a/Include/internal/pycore_backoff.h
+++ b/Include/internal/pycore_backoff.h
@@ -44,7 +44,7 @@ make_backoff_counter(uint16_t value, uint16_t backoff)
{
assert(backoff <= 15);
assert(value <= 0xFFF);
- return (_Py_BackoffCounter){.value = value, .backoff = backoff};
+ return (_Py_BackoffCounter){.backoff = backoff, .value = value};
}

static inline _Py_BackoffCounter

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-leave@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: list-python-checkins@lists.gossamer-threads.com