Commit 64c1560b authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by Willem
Browse files

Fix fuzz test issue with python 3.x. (#68)

parent 296c7e0b
...@@ -28,7 +28,10 @@ class Libraft(object): ...@@ -28,7 +28,10 @@ class Libraft(object):
self.lib = ffi.dlopen(library) self.lib = ffi.dlopen(library)
def load(fname): def load(fname):
return subprocess.check_output(["gcc", "-E", fname]) return '\n'.join(
[line for line in subprocess.check_output(
["gcc", "-E", fname]).decode('utf-8').split('\n')
if not line.startswith('#')])
ffi.cdef(load('include/raft.h')) ffi.cdef(load('include/raft.h'))
ffi.cdef(load('include/raft_log.h')) ffi.cdef(load('include/raft_log.h'))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment