summaryrefslogtreecommitdiff
path: root/cffi/vengine_cpy.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2013-11-08 20:09:48 +0100
committerArmin Rigo <arigo@tunes.org>2013-11-08 20:09:48 +0100
commit4c1008c6097cec5275ffee818b530d4c34427cf4 (patch)
tree989188e30a3b7c4a114bc0b855afc83293560983 /cffi/vengine_cpy.py
parent5a42380d78fcb0cde684c34da39d1546a7d4d951 (diff)
downloadcffi-4c1008c6097cec5275ffee818b530d4c34427cf4.tar.gz
Fix some tests
Diffstat (limited to 'cffi/vengine_cpy.py')
-rw-r--r--cffi/vengine_cpy.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/cffi/vengine_cpy.py b/cffi/vengine_cpy.py
index acc9adc..49dc72b 100644
--- a/cffi/vengine_cpy.py
+++ b/cffi/vengine_cpy.py
@@ -531,9 +531,10 @@ class VCPythonEngine(object):
continue # xxx ignore fbitsize for now
check(layout[i], ffi.offsetof(BStruct, fname),
"wrong offset for field %r" % (fname,))
- BField = ffi._get_cached_btype(ftype)
- check(layout[i+1], ffi.sizeof(BField),
- "wrong size for field %r" % (fname,))
+ if layout[i+1] != 0:
+ BField = ffi._get_cached_btype(ftype)
+ check(layout[i+1], ffi.sizeof(BField),
+ "wrong size for field %r" % (fname,))
i += 2
assert i == len(layout)