[pypy-commit] cffi default: Skip pragmas even if pycparser does parse them
arigo
pypy.commits at gmail.com
Mon Oct 24 03:19:41 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
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:
More information about the pypy-commit
mailing list