Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from cffi import FFI
- ffi = FFI()
- lib_path = ''
- include_path = ''
- # read file
- with open(os.path.join(os.getcwd(), "jitbuilder.cdef.h")) as f:
- cdef = f.read() + "\nextern \"Python\" bool my_buildIl(struct IlBuilder *);"
- # configure cffi
- ffi.cdef(cdef)
- ffi.set_source("_jitbuilder", r""" #include "JitBuilder.h" """, extra_objects=[lib_path],include_dirs=[include_path])
- """ void BB_AddSuccessorBuildersWithArgArray_v(struct BytecodeBuilder * self, uint32_t numBuilders, ...); """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement