Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c6f8dc

Browse files
committed
Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by Andreas Schwab.
1 parent 99d8dd2 commit 8c6f8dc

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

Include/unicodeobject.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,9 @@ typedef struct {
343343
the data pointer is filled out. The bit is redundant, and helps
344344
to minimize the test in PyUnicode_IS_READY(). */
345345
unsigned int ready:1;
346+
/* Padding to ensure that PyUnicode_DATA() is always aligned to
347+
4 bytes (see issue #19537 on m68k). */
348+
unsigned int :24;
346349
} state;
347350
wchar_t *wstr; /* wchar_t representation (null-terminated) */
348351
} PyASCIIObject;

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,7 @@ Robin Schreiber
11701170
Chad J. Schroeder
11711171
Christian Schubert
11721172
Sam Schulenburg
1173+
Andreas Schwab
11731174
Stefan Schwarzer
11741175
Dietmar Schwertberger
11751176
Federico Schwindt

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Release date: TBA
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by
14+
Andreas Schwab.
15+
1316
- Issue #20929: Add a type cast to avoid shifting a negative number.
1417

1518
- Issue #20731: Properly position in source code files even if they

0 commit comments

Comments
 (0)