[Python-checkins] bpo-39689: Do not use native packing for format "?" with standard size (GH-18969)
Miss Islington (bot)
webhook-mailer at python.org
Tue Mar 31 08:26:11 EDT 2020
https://github.com/python/cpython/commit/572ef747692055a270a9fbf8eeaf5c4a15c8e332
commit: 572ef747692055a270a9fbf8eeaf5c4a15c8e332
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-03-31T05:26:05-07:00
summary:
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 at bytereef.org>
files:
M Modules/_struct.c
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 9281c6803f3a6..1c917b7513f46 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;
More information about the Python-checkins
mailing list