Author: Armin Rigo <[email protected]>
Branch:
Changeset: r2796:f6f50e34f593
Date: 2016-10-24 09:19 +0200
http://bitbucket.org/cffi/cffi/changeset/f6f50e34f593/
Log: Skip pragmas even if pycparser does parse them
diff --git a/cffi/cparser.py b/cffi/cparser.py
--- a/cffi/cparser.py
+++ b/cffi/cparser.py
@@ -334,6 +334,8 @@
realtype, quals = self._get_type_and_quals(
decl.type, name=decl.name, partial_length_ok=True)
self._declare('typedef ' + decl.name, realtype,
quals=quals)
+ elif decl.__class__.__name__ == 'Pragma':
+ pass # skip pragma, only in pycparser 2.15
else:
raise api.CDefError("unrecognized construct", decl)
except api.FFIError as e:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit