Skip to content

Commit

Permalink
bpo-39689: Do not use native packing for format "?" with standard size (
Browse files Browse the repository at this point in the history
GH-18969)

(cherry picked from commit 472fc84)

Co-authored-by: Stefan Krah <[email protected]>
  • Loading branch information
miss-islington and Stefan Krah authored Mar 31, 2020
1 parent bb7a491 commit 0f9e889
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Modules/_struct.c
Original file line number Diff line number Diff line change
Expand Up @@ -2339,6 +2339,9 @@ PyInit__struct(void)
"unknown" float format */
if (ptr->format == 'd' || ptr->format == 'f')
break;
/* Skip _Bool, semantics are different for standard size */
if (ptr->format == '?')
break;
ptr->pack = native->pack;
ptr->unpack = native->unpack;
break;
Expand Down

0 comments on commit 0f9e889

Please sign in to comment.