diff options
author | Thomas Heller <theller@ctypes.org> | 2006-09-07 18:56:28 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2006-09-07 18:56:28 (GMT) |
commit | fdb62f0e5f0b7d1a70a9d8948768ff09ea420c41 (patch) | |
tree | 5dae99a7d879e5000f2a4e846c8f766287a4b62f /Modules | |
parent | 863f3d1fbff6b65eb0526f2d98a6f89474b96eb9 (diff) | |
download | cpython-fdb62f0e5f0b7d1a70a9d8948768ff09ea420c41.zip cpython-fdb62f0e5f0b7d1a70a9d8948768ff09ea420c41.tar.gz cpython-fdb62f0e5f0b7d1a70a9d8948768ff09ea420c41.tar.bz2 |
Anonymous structure fields that have a bit-width specified did not work,
and they gave a strange error message from PyArg_ParseTuple:
function takes exactly 2 arguments (3 given).
With tests.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/stgdict.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c index 182b9af..d701f9e 100644 --- a/Modules/_ctypes/stgdict.c +++ b/Modules/_ctypes/stgdict.c @@ -177,11 +177,11 @@ MakeFields(PyObject *type, CFieldObject *descr, for (i = 0; i < PySequence_Fast_GET_SIZE(fieldlist); ++i) { PyObject *pair = PySequence_Fast_GET_ITEM(fieldlist, i); /* borrowed */ - PyObject *fname, *ftype; + PyObject *fname, *ftype, *bits; CFieldObject *fdescr; CFieldObject *new_descr; /* Convert to PyArg_UnpackTuple... */ - if (!PyArg_ParseTuple(pair, "OO", &fname, &ftype)) { + if (!PyArg_ParseTuple(pair, "OO|O", &fname, &ftype, &bits)) { Py_DECREF(fieldlist); return -1; } |