Author: Armin Rigo <[email protected]>
Branch: cffi-1.0
Changeset: r1849:8bb6d2089f42
Date: 2015-04-26 16:15 +0200
http://bitbucket.org/cffi/cffi/changeset/8bb6d2089f42/
Log: Don't emit _CFFI_F_CHECK_FIELDS on opaque structs (it is ignored
anyway but confusing)
diff --git a/_cffi1/recompiler.py b/_cffi1/recompiler.py
--- a/_cffi1/recompiler.py
+++ b/_cffi1/recompiler.py
@@ -462,7 +462,9 @@
flags = []
if isinstance(tp, model.UnionType):
flags.append("_CFFI_F_UNION")
- if tp.partial or tp.has_anonymous_struct_fields():
+ if tp.fldtypes is None:
+ pass # opaque
+ elif tp.partial or tp.has_anonymous_struct_fields():
pass # the field layout is obtained silently from the C compiler
else:
flags.append("_CFFI_F_CHECK_FIELDS")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit