[Python-checkins] [3.6] bpo-31018: Switch to GH-pragma pack from __declspec(align) (GH-2848) (#2868)

Victor Stinner webhook-mailer at python.org
Tue Jul 25 13:20:41 EDT 2017


https://github.com/python/cpython/commit/d8b5216f998bbb0f921815165f46918b86620ab7
commit: d8b5216f998bbb0f921815165f46918b86620ab7
branch: 3.6
author: Segev Finer <segev208 at gmail.com>
committer: Victor Stinner <victor.stinner at gmail.com>
date: 2017-07-25T19:20:38+02:00
summary:

[3.6] bpo-31018: Switch to GH-pragma pack from __declspec(align) (GH-2848) (#2868)

(cherry picked from commit 39243779f4c97ec6f700fa73c007ca66dfa9408e)

files:
M Modules/_tracemalloc.c

diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
index 0ce38ffc78c..4f3bb5463f0 100644
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -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 {



More information about the Python-checkins mailing list