mercurial/cffi/mpatchbuild.py
changeset 32506 2dcb3d52ef41
parent 32505 05a16c19967e
child 36948 0585337ea787
equal deleted inserted replaced
32505:05a16c19967e 32506:2dcb3d52ef41
     4 import os
     4 import os
     5 
     5 
     6 ffi = cffi.FFI()
     6 ffi = cffi.FFI()
     7 mpatch_c = os.path.join(os.path.join(os.path.dirname(__file__), '..',
     7 mpatch_c = os.path.join(os.path.join(os.path.dirname(__file__), '..',
     8                                      'mpatch.c'))
     8                                      'mpatch.c'))
     9 ffi.set_source("_mpatch_cffi", open(mpatch_c).read(),
     9 ffi.set_source("mercurial.cffi._mpatch", open(mpatch_c).read(),
    10                include_dirs=["mercurial"])
    10                include_dirs=["mercurial"])
    11 ffi.cdef("""
    11 ffi.cdef("""
    12 
    12 
    13 struct mpatch_frag {
    13 struct mpatch_frag {
    14        int start, end, len;
    14        int start, end, len;