Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Mac build #22

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions make_ffi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
import cffi
import subprocess

Expand Down Expand Up @@ -56,8 +57,10 @@ def doit(vex_path):
#header = vex_pp + pyvex_pp

linesep = '\r\n' if '\r\n' in header else '\n'
ffi_text = linesep.join(line for line in header.split(linesep) if not line.startswith('#') and line != '')
ffi_text = ffi_text.replace('{'+linesep+' } NoOp;', '{ int DONOTUSE; } NoOp;')
ffi_text = linesep.join(line for line in header.split(linesep) if '#' not in line and line.strip() != '' and 'jmp_buf' not in line)
ffi_text = re.sub('\{\s*\} NoOp;', '{ int DONOTUSE; } NoOp;', ffi_text)
ffi_text = re.sub('__attribute__\s*\(.*\)', '', ffi_text)
ffi_text = ffi_text.replace('__const', 'const')
ffi_lines = ffi_text.split(linesep)

good = find_good_scan([], ffi_lines)
Expand Down