So I was trying to wrap xlib.h and there is this declaration:
#define Bool int
And if Bool is then used in function prototype or as value in a struct I get: cffi.api.CDefError: cannot parse ...
A possible workaround is to simply replace all uses of Bool with int.
Here is the original script that triggered the error with a very simple test case at the end.