diff --git a/cm_library_cffi_headers/compose_cffi_headers.py b/cm_library_cffi_headers/compose_cffi_headers.py index dfeb7a7b..b1980057 100644 --- a/cm_library_cffi_headers/compose_cffi_headers.py +++ b/cm_library_cffi_headers/compose_cffi_headers.py @@ -20,6 +20,7 @@ def remove_c_includes(lines): def remove_special_defines(lines, defines): return [line for line in lines if not any(f'#define {define}' in line for define in defines)] + def apply_cffi_defines_syntax(lines): return [re.sub(r'#\s*define\s+(\w+).*', r'#define \1 ...', line) for line in lines]