bpo-39689: Do not use native packing for format "?" with standard size (GH-18969)

(cherry picked from commit 472fc843ca)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
This commit is contained in:
Miss Islington (bot) 2020-03-31 05:26:05 -07:00 committed by GitHub
parent 6a0ee60db4
commit 572ef74769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -2365,6 +2365,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;