comparison mercurial/cffi/bdiffbuild.py @ 43668:53607fd3ec6c stable

cffi: fix build on Python 3 CFFI expects the arguments to be of type str, which means that the string literals should not have the `b` prefix.
author Manuel Jacob <me@manueljacob.de>
date Sun, 17 Nov 2019 19:55:01 +0100
parents 687b865b95ad
children 6000f5b25c9b
comparison
equal deleted inserted replaced
43667:4cd911040ba5 43668:53607fd3ec6c
3 import cffi 3 import cffi
4 import os 4 import os
5 5
6 ffi = cffi.FFI() 6 ffi = cffi.FFI()
7 with open( 7 with open(
8 os.path.join(os.path.join(os.path.dirname(__file__), b'..'), b'bdiff.c') 8 os.path.join(os.path.join(os.path.dirname(__file__), '..'), 'bdiff.c')
9 ) as f: 9 ) as f:
10 ffi.set_source( 10 ffi.set_source(
11 b"mercurial.cffi._bdiff", f.read(), include_dirs=[b'mercurial'] 11 "mercurial.cffi._bdiff", f.read(), include_dirs=['mercurial']
12 ) 12 )
13 ffi.cdef( 13 ffi.cdef(
14 """ 14 """
15 struct bdiff_line { 15 struct bdiff_line {
16 int hash, n, e; 16 int hash, n, e;