"expected a simple numeric constant" error: line number is missing
Created originally on Bitbucket by frafra (Francesco Frassinelli)
This error doesn't show where the problematic code is located.
#!python
$ python -c "from cffi import FFI; ffi=FFI(); ffi.cdef(open('nodave_cffi.h').read(), override=True)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/cffi-0.7-py2.7-linux-x86_64.egg/cffi/api.py", line 97, in cdef
self._parser.parse(csource, override=override)
File "/usr/lib64/python2.7/site-packages/cffi-0.7-py2.7-linux-x86_64.egg/cffi/cparser.py", line 154, in parse
self._internal_parse(csource)
File "/usr/lib64/python2.7/site-packages/cffi-0.7-py2.7-linux-x86_64.egg/cffi/cparser.py", line 191, in _internal_parse
realtype = self._get_type(decl.type, name=decl.name)
File "/usr/lib64/python2.7/site-packages/cffi-0.7-py2.7-linux-x86_64.egg/cffi/cparser.py", line 322, in _get_type
return self._get_struct_union_enum_type('struct', type, name)
File "/usr/lib64/python2.7/site-packages/cffi-0.7-py2.7-linux-x86_64.egg/cffi/cparser.py", line 476, in _get_struct_union_enum_type
type = self._get_type(decl.type, partial_length_ok=True)
File "/usr/lib64/python2.7/site-packages/cffi-0.7-py2.7-linux-x86_64.egg/cffi/cparser.py", line 278, in _get_type
typenode.dim, partial_length_ok=partial_length_ok)
File "/usr/lib64/python2.7/site-packages/cffi-0.7-py2.7-linux-x86_64.egg/cffi/cparser.py", line 516, in _parse_constant
raise api.FFIError("unsupported expression: expected a "
cffi.api.FFIError: unsupported expression: expected a simple numeric constant
$ hg log | head -1
changeset: 1300:c268d05a14da