]> granicus.if.org Git - python/commitdiff
bpo-31018: Switch to #pragma pack from __declspec(align) (#2848)
authorSegev Finer <segev208@gmail.com>
Tue, 25 Jul 2017 08:47:43 +0000 (11:47 +0300)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 25 Jul 2017 08:47:43 +0000 (10:47 +0200)
Modules/_tracemalloc.c

index d9833362dd1dfdd9d4db83681317a522ae4071dd..6966b86a48ad40e5831644fec4031a6be326c02b 100644 (file)
@@ -83,7 +83,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
@@ -91,6 +91,9 @@ _declspec(align(4))
     PyObject *filename;
     unsigned int lineno;
 } frame_t;
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif
 
 
 typedef struct {