Hi,
On Wed, Jan 15, 2014 at 11:26 AM, Lukas Lueg <
lukas...@gmail.com> wrote:
> Is there some best practice how the preprocess the interface definition
> string without issue #5 having been solved?
Maybe I'm missing something, but it seems to me you want to do the
equivalent of:
ffi.cdef("""
#if SOME_CONDITION
typedef signed long long gint64;
#else
typedef signed long gint64;
#endif
MORE_THINGS
""")
If the condition can be expressed as a Python expression, you can
simply write the above as:
if some_condition:
ffi.cdef("typedef signed long long gint64;")
else:
ffi.cdef("typedef signed long gint64;")
ffi.cdef("""
MORE_THINGS
""")
Is this answer actually helping, or am I too naive?
A bientôt,
Armin.