diff options
author | Stefan Krah <skrah@bytereef.org> | 2020-03-24 14:01:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 06:01:13 -0700 |
commit | 472fc843ca816d65c12f9508ac762ca492165c45 (patch) | |
tree | db46841bdc9f8d0f5b78d89b64de9eaacd7d8b51 | |
parent | 6000087fe979705dc588a46a35da884cc0198c67 (diff) | |
download | cpython-git-472fc843ca816d65c12f9508ac762ca492165c45.tar.gz |
bpo-39689: Do not use native packing for format "?" with standard size (GH-18969)
-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 b4b52a754f..242ca9c10d 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; |