This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author theller
Recipients effbot, mgiuca, rpetrov, skip.montanaro, theller, tim.maxwell
Date 2008-09-25.19:12:54
SpamBayes Score 3.9798368e-07
Marked as misclassified No
Message-id <1222369975.86.0.802829693669.issue3547@psf.upfronthosting.co.za>
In-reply-to
Content
Does the following patch fix the test failure with MingW?

<patch>
Index: cfield.c
===================================================================
--- cfield.c	(revision 66611)
+++ cfield.c	(working copy)
@@ -65,10 +65,10 @@
 	}
 	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 */
+#if defined(MS_WIN32)
+	    && dict->size * 8 == *pfield_size /* Windows */
 #else
-	    && dict->size * 8 <= *pfield_size /* GCC, MINGW */
+	    && dict->size * 8 <= *pfield_size /* GCC */
 #endif
 	    && (*pbitofs + bitsize) <= *pfield_size) {
 		/* continue bit field */
<end patch>

Also, can you please post the output of the following code snippet?

<test script>
from ctypes import *

class X(Structure):
    _fields_ = [("a", c_short, 4),
                ("b", c_short, 4),
                ("c", c_int, 24),
                ("d", c_short, 4),
                ("e", c_short, 4),
                ("f", c_int, 24)]

print X.a
print X.b
print X.c
print X.d
print X.e
print X.f
<end test script>
History
Date User Action Args
2008-09-25 19:12:56thellersetrecipients: + theller, effbot, skip.montanaro, mgiuca, tim.maxwell, rpetrov
2008-09-25 19:12:55thellersetmessageid: <1222369975.86.0.802829693669.issue3547@psf.upfronthosting.co.za>
2008-09-25 19:12:55thellerlinkissue3547 messages
2008-09-25 19:12:54thellercreate