File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -165,17 +165,28 @@ check by comparing the reference count field to the immortality reference count.
165165 */
166166struct _object {
167167 _PyObject_HEAD_EXTRA
168+
168169#if (defined(__GNUC__ ) || defined(__clang__ )) \
169170 && !(defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L )
170171 // On C99 and older, anonymous union is a GCC and clang extension
171172 __extension__
173+ #endif
174+ #ifdef _MSC_VER
175+ // Ignore MSC warning C4201: "nonstandard extension used:
176+ // nameless struct/union"
177+ __pragma (warning (push ))
178+ __pragma (warning (disable : 4201 ))
172179#endif
173180 union {
174181 Py_ssize_t ob_refcnt ;
175182#if SIZEOF_VOID_P > 4
176183 PY_UINT32_T ob_refcnt_split [2 ];
177184#endif
178185 };
186+ #ifdef _MSC_VER
187+ __pragma (warning (pop ))
188+ #endif
189+
179190 PyTypeObject * ob_type ;
180191};
181192
You can’t perform that action at this time.
0 commit comments