equal
deleted
inserted
replaced
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("mercurial.cffi._mpatch", open(mpatch_c).read(), |
9 with open(mpatch_c) as f: |
10 include_dirs=["mercurial"]) |
10 ffi.set_source("mercurial.cffi._mpatch", f.read(), |
|
11 include_dirs=["mercurial"]) |
11 ffi.cdef(""" |
12 ffi.cdef(""" |
12 |
13 |
13 struct mpatch_frag { |
14 struct mpatch_frag { |
14 int start, end, len; |
15 int start, end, len; |
15 const char *data; |
16 const char *data; |