File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ extern "C" {
1414#include <stdint.h>
1515
1616
17+ #ifdef _AIX
18+ #pragma pack(push, 1)
19+ #endif
1720typedef struct {
1821 union {
1922 struct {
@@ -23,6 +26,9 @@ typedef struct {
2326 uint16_t as_counter ; // For printf("%#x", ...)
2427 };
2528} _Py_BackoffCounter ;
29+ #ifdef _AIX
30+ #pragma pack(pop)
31+ #endif
2632
2733
2834/* 16-bit countdown counters using exponential backoff.
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ extern "C" {
2121 * 2**32 - 1, rather than INT_MAX.
2222 */
2323
24+ #ifdef _AIX
25+ #pragma pack(push, 1)
26+ #endif
2427typedef union {
2528 uint16_t cache ;
2629 struct {
@@ -29,6 +32,9 @@ typedef union {
2932 } op ;
3033 _Py_BackoffCounter counter ; // First cache entry of specializable op
3134} _Py_CODEUNIT ;
35+ #ifdef _AIX
36+ #pragma pack(pop)
37+ #endif
3238
3339#define _PyCode_CODE (CO ) _Py_RVALUE((_Py_CODEUNIT *)(CO)->co_code_adaptive)
3440#define _PyCode_NBYTES (CO ) (Py_SIZE(CO) * (Py_ssize_t)sizeof(_Py_CODEUNIT))
Original file line number Diff line number Diff line change 1+ Fix AIX build failures caused by incorrect struct alignment in ``_Py_CODEUNIT ``
2+ and ``_Py_BackoffCounter `` by adding AIX-specific ``#pragma pack `` directives.
You can’t perform that action at this time.
0 commit comments