[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:24:14 EDT 2020


https://github.com/python/cpython/commit/0f9e889cd94c1e86f8ff28733b207c99803ca8a4
commit: 0f9e889cd94c1e86f8ff28733b207c99803ca8a4
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020年03月31日T05:24:07-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 66f74d63b735f..c09951dcb79f3 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -2339,6 +2339,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

AltStyle によって変換されたページ (->オリジナル) /