Advertisement
Guest User

Untitled

a guest
May 28th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import os
  2. from cffi import FFI
  3.  
  4. ffi = FFI()
  5.  
  6. lib_path = './jitbuilder/libjitbuilder.a'
  7. include_path = './release/c/include'
  8.  
  9. # read file
  10. with open(os.path.join(os.getcwd(), "jitbuilder.cdef.h")) as f:
  11.     cdef = f.read()
  12.  
  13. # configure cffi
  14. ffi.cdef("""void BB_AddSuccessorBuildersWithArgArray_v(struct BytecodeBuilder * self, uint32_t numBuilders, ...);""")
  15.  
  16. ffi.set_source("_jitbuilder", r""" #include "JitBuilder.h" """, extra_objects=[lib_path],include_dirs=[include_path])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement