Skip to content

Commit 572ef74

Browse files
miss-islingtonStefan Krah
and
Stefan Krah
authored
bpo-39689: Do not use native packing for format "?" with standard size (GH-18969)
(cherry picked from commit 472fc84) Co-authored-by: Stefan Krah <[email protected]>
1 parent 6a0ee60 commit 572ef74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Modules/_struct.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,6 +2365,9 @@ PyInit__struct(void)
23652365
"unknown" float format */
23662366
if (ptr->format == 'd' || ptr->format == 'f')
23672367
break;
2368+
/* Skip _Bool, semantics are different for standard size */
2369+
if (ptr->format == '?')
2370+
break;
23682371
ptr->pack = native->pack;
23692372
ptr->unpack = native->unpack;
23702373
break;

0 commit comments

Comments
 (0)