]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117549: Match declaration order for _Py_BackoffCounter initializer (#117551)
authorMichael Droettboom <mdboom@gmail.com>
Thu, 4 Apr 2024 21:14:35 +0000 (17:14 -0400)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2024 21:14:35 +0000 (14:14 -0700)
Otherwise it might not compile with C++ (or certain C compilers/flags?).

Include/internal/pycore_backoff.h

index 5d93c889e84976b02cc19339fa9286d6eb37a6e9..decf92bc419c04428c6f1f6ae290352d2befde6e 100644 (file)
@@ -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