]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.6] bpo-31018: Switch to GH-pragma pack from __declspec(align) (GH-2848) (#2868)
authorSegev Finer <segev208@gmail.com>
Tue, 25 Jul 2017 17:20:38 +0000 (20:20 +0300)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 25 Jul 2017 17:20:38 +0000 (19:20 +0200)
(cherry picked from commit 39243779f4c97ec6f700fa73c007ca66dfa9408e)

Modules/_tracemalloc.c

index 0ce38ffc78c53f01ffdb00d49ffd7e3cd8337f7b..4f3bb5463f03866fa11b8afce6050ff87786a2a6 100644 (file)
@@ -77,7 +77,7 @@ typedef struct
 #ifdef __GNUC__
 __attribute__((packed))
 #elif defined(_MSC_VER)
-_declspec(align(4))
+#pragma pack(push, 4)
 #endif
 {
     /* filename cannot be NULL: "<unknown>" is used if the Python frame
@@ -85,6 +85,9 @@ _declspec(align(4))
     PyObject *filename;
     unsigned int lineno;
 } frame_t;
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif
 
 
 typedef struct {