diff options
author | Stefan Krah <skrah@bytereef.org> | 2020-03-24 13:01:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 13:01:13 (GMT) |
commit | 472fc843ca816d65c12f9508ac762ca492165c45 (patch) | |
tree | db46841bdc9f8d0f5b78d89b64de9eaacd7d8b51 /Modules | |
parent | 6000087fe979705dc588a46a35da884cc0198c67 (diff) | |
download | cpython-472fc843ca816d65c12f9508ac762ca492165c45.zip cpython-472fc843ca816d65c12f9508ac762ca492165c45.tar.gz cpython-472fc843ca816d65c12f9508ac762ca492165c45.tar.bz2 |
bpo-39689: Do not use native packing for format "?" with standard size (GH-18969)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_struct.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c index b4b52a7..242ca9c 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -2407,6 +2407,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; |