Mercurial > hg
comparison mercurial/cffi/mpatchbuild.py @ 32506:2dcb3d52ef41
cffi: put compiled modules into mercurial.cffi package
Don't pollute the top-level namespace.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 02 May 2017 21:08:38 +0900 |
parents | 05a16c19967e |
children | 0585337ea787 |
comparison
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; |