Fix issue #3547: ctypes is confused by bitfields of varying integer types

Reviewed by Fredrik Lundh and Skip Montanaro.
This commit is contained in:
Thomas Heller 2008-09-24 18:26:05 +00:00
parent 8798c90df2
commit a85c95d5e8
3 changed files with 19 additions and 1 deletions

View file

@ -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;