diff options
author | Armin Rigo <arigo@tunes.org> | 2015-06-15 09:04:20 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2015-06-15 09:04:20 +0200 |
commit | 4afd68b39ec91c1923d74aa45b2d9120ef8a5036 (patch) | |
tree | 7805ec143ef5211ededb5e8dd02b2fcd54ffe76d /cffi/cparser.py | |
parent | d1716f8ee5dd98b1c6d83cd362115940cf3d8c0a (diff) | |
download | cffi-4afd68b39ec91c1923d74aa45b2d9120ef8a5036.tar.gz |
Explicitly complain if we find 'typedef int... t;' in a call to verify()
Diffstat (limited to 'cffi/cparser.py')
-rw-r--r-- | cffi/cparser.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cffi/cparser.py b/cffi/cparser.py index 5eed5a5..6675b30 100644 --- a/cffi/cparser.py +++ b/cffi/cparser.py @@ -102,6 +102,7 @@ class Parser(object): self._packed = False self._int_constants = {} self._recomplete = [] + self._uses_new_feature = None def _parse(self, csource): csource, macros = _preprocess(csource) @@ -648,4 +649,7 @@ class Parser(object): for t in typenames[:-1]: if t not in ['int', 'short', 'long', 'signed', 'unsigned', 'char']: raise api.FFIError(':%d: bad usage of "..."' % decl.coord.line) + if self._uses_new_feature is None: + self._uses_new_feature = "'typedef %s... %s'" % ( + ' '.join(typenames[:-1]), decl.name) return model.UnknownIntegerType(decl.name) |