summaryrefslogtreecommitdiff
path: root/cffi
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2019-06-12 17:58:26 +0200
committerArmin Rigo <arigo@tunes.org>2019-06-12 17:58:26 +0200
commitf50cf76eb836582beda30a0828151997896040dc (patch)
treee245b32770e743fdc44e96e7a2ccd3693e24984f /cffi
parent7c94e003e06bdd32f9a7eaf013551ea0dcd45cdd (diff)
downloadcffi-f50cf76eb836582beda30a0828151997896040dc.tar.gz
Issue #412
Test and fix for unnamed bitfields which are not ":0" bitfields.
Diffstat (limited to 'cffi')
-rw-r--r--cffi/recompiler.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cffi/recompiler.py b/cffi/recompiler.py
index 20e912b..d6530e5 100644
--- a/cffi/recompiler.py
+++ b/cffi/recompiler.py
@@ -855,8 +855,9 @@ class Recompiler:
try:
if ftype.is_integer_type() or fbitsize >= 0:
# accept all integers, but complain on float or double
- prnt(" (void)((p->%s) | 0); /* check that '%s.%s' is "
- "an integer */" % (fname, cname, fname))
+ if fname != '':
+ prnt(" (void)((p->%s) | 0); /* check that '%s.%s' is "
+ "an integer */" % (fname, cname, fname))
continue
# only accept exactly the type declared, except that '[]'
# is interpreted as a '*' and so will match any array length.