[Python-checkins] bpo-31018: Switch to #pragma pack from __declspec(align) (#2848)
Victor Stinner
webhook-mailer at python.org
Tue Jul 25 04:47:48 EDT 2017
https://github.com/python/cpython/commit/39243779f4c97ec6f700fa73c007ca66dfa9408e
commit: 39243779f4c97ec6f700fa73c007ca66dfa9408e
branch: master
author: Segev Finer <segev208 at gmail.com>
committer: Victor Stinner <victor.stinner at gmail.com>
date: 2017-07-25T10:47:43+02:00
summary:
bpo-31018: Switch to #pragma pack from __declspec(align) (#2848)
files:
M Modules/_tracemalloc.c
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
index d9833362dd1..6966b86a48a 100644
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -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 {
More information about the Python-checkins
mailing list