diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/cfield.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c index 9040dbb..b6f41fe 100644 --- a/Modules/_ctypes/cfield.c +++ b/Modules/_ctypes/cfield.c @@ -61,10 +61,12 @@ CField_FromDesc(PyObject *desc, Py_ssize_t index, } if (bitsize /* this is a bitfield request */ && *pfield_size /* we have a bitfield open */ -#if defined(MS_WIN32) && !defined(__MINGW32__) - && dict->size * 8 == *pfield_size /* MSVC */ +#ifdef MS_WIN32 + /* MSVC, GCC with -mms-bitfields */ + && dict->size * 8 == *pfield_size #else - && dict->size * 8 <= *pfield_size /* GCC, MINGW */ + /* GCC */ + && dict->size * 8 <= *pfield_size #endif && (*pbitofs + bitsize) <= *pfield_size) { /* continue bit field */ |