Skip to content

Commit

Permalink
Skip pragmas even if pycparser does parse them
Browse files Browse the repository at this point in the history
  • Loading branch information
arigo committed Oct 24, 2016
1 parent b4d02e9 commit 6da6407
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cffi/cparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ def _internal_parse(self, csource):
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:
Expand Down

0 comments on commit 6da6407

Please sign in to comment.