summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2008-09-24 18:26:05 (GMT)
committerThomas Heller <theller@ctypes.org>2008-09-24 18:26:05 (GMT)
commita85c95d5e85e1d6886d1260b88221c2a31686a55 (patch)
treecfedbc3bc8888d127de4e0c4a133105da3630bcf /Modules
parent8798c90df2b2d77ddb76611c0ea4be463c543f2b (diff)
downloadcpython-a85c95d5e85e1d6886d1260b88221c2a31686a55.zip
cpython-a85c95d5e85e1d6886d1260b88221c2a31686a55.tar.gz
cpython-a85c95d5e85e1d6886d1260b88221c2a31686a55.tar.bz2
Fix issue #3547: ctypes is confused by bitfields of varying integer types
Reviewed by Fredrik Lundh and Skip Montanaro.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/cfield.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index ba837ec..b9024bb 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -163,7 +163,7 @@ CField_FromDesc(PyObject *desc, Py_ssize_t index,
break;
case EXPAND_BITFIELD:
- /* XXX needs more */
+ *poffset += dict->size - *pfield_size/8;
*psize += dict->size - *pfield_size/8;
*pfield_size = dict->size * 8;