Skip to content

Commit

Permalink
(fix) secp256k1 haeder dir for c-binding compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
MementoRC committed Jun 29, 2024
1 parent 7817ca6 commit 88818d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions cm_library_c_binding/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ add_custom_command(
)

add_custom_target(cffi-c-binding ALL DEPENDS ${CFFI_C_CODE_DIR}/${CFFI_C_CODE})
target_include_directories(${CFFI_OUTPUT_LIBRARY} PUBLIC ${VENDORED_HEADERS_DIR})
add_dependencies(cffi-c-binding headers-for-cffi)
11 changes: 9 additions & 2 deletions cm_library_cffi_headers/compose_cffi_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@ def remove_c_comments_emptylines(text):


def remove_c_includes(lines):
return [line for line in lines if not line.startswith('#include ')]
return [line for line in lines if not re.match(r'^\s*#include\s', line)]


def remove_special_defines(lines, defines):
return [line for line in lines if not any(f'#define {define}' in line for define in defines)]
return [
line
for line in lines
if all(
re.search(f'^\s*#define\s+{define}', line) is None
for define in defines
)
]


def apply_cffi_defines_syntax(lines):
Expand Down

0 comments on commit 88818d9

Please sign in to comment.