Skip to content

Commit 472fc84

Browse files
author
Stefan Krah
authored
bpo-39689: Do not use native packing for format "?" with standard size (GH-18969)
1 parent 6000087 commit 472fc84

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Modules/_struct.c

+3
Original file line numberDiff line numberDiff line change
@@ -2407,6 +2407,9 @@ PyInit__struct(void)
24072407
"unknown" float format */
24082408
if (ptr->format == 'd' || ptr->format == 'f')
24092409
break;
2410+
/* Skip _Bool, semantics are different for standard size */
2411+
if (ptr->format == '?')
2412+
break;
24102413
ptr->pack = native->pack;
24112414
ptr->unpack = native->unpack;
24122415
break;

0 commit comments

Comments
 (0)