diff options
author | Armin Rigo <arigo@tunes.org> | 2012-08-23 17:07:17 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2012-08-23 17:07:17 +0200 |
commit | 22ebe2640452383872537ec0debe1c227bb1e64a (patch) | |
tree | 37d8a19eaeb1a67856c7c92de9cda8675c482ecf /cffi/backend_ctypes.py | |
parent | 333d5b85e8b1af50984f4f8e80f861b4431c007a (diff) | |
download | cffi-22ebe2640452383872537ec0debe1c227bb1e64a.tar.gz |
Support nested anonymous structs in the front-end part.
Diffstat (limited to 'cffi/backend_ctypes.py')
-rw-r--r-- | cffi/backend_ctypes.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cffi/backend_ctypes.py b/cffi/backend_ctypes.py index db971e2..7509ae1 100644 --- a/cffi/backend_ctypes.py +++ b/cffi/backend_ctypes.py @@ -742,6 +742,8 @@ class CTypesBackend(object): name2fieldtype = dict(zip(fnames, zip(btypes, bitfields))) # for fname, BField, bitsize in fields: + if fname == '': + raise NotImplementedError("nested anonymous structs/unions") if hasattr(CTypesStructOrUnion, fname): raise ValueError("the field name %r conflicts in " "the ctypes backend" % fname) |