diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-03-31 12:26:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-31 12:26:05 (GMT) |
commit | 572ef747692055a270a9fbf8eeaf5c4a15c8e332 (patch) | |
tree | 6d230f98dd589684891301dd58b627135e4f3e0b /Modules | |
parent | 6a0ee60db4cee4a01bae1a2922d21a859e9ea2ed (diff) | |
download | cpython-572ef747692055a270a9fbf8eeaf5c4a15c8e332.zip cpython-572ef747692055a270a9fbf8eeaf5c4a15c8e332.tar.gz cpython-572ef747692055a270a9fbf8eeaf5c4a15c8e332.tar.bz2 |
bpo-39689: Do not use native packing for format "?" with standard size (GH-18969)
(cherry picked from commit 472fc843ca816d65c12f9508ac762ca492165c45)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
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 9281c68..1c917b7 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -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; |