Skip to content

Commit 0f9e889

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 bb7a491 commit 0f9e889

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
@@ -2339,6 +2339,9 @@ PyInit__struct(void)
23392339
"unknown" float format */
23402340
if (ptr->format == 'd' || ptr->format == 'f')
23412341
break;
2342+
/* Skip _Bool, semantics are different for standard size */
2343+
if (ptr->format == '?')
2344+
break;
23422345
ptr->pack = native->pack;
23432346
ptr->unpack = native->unpack;
23442347
break;

0 commit comments

Comments
 (0)