Mercurial > hg
comparison mercurial/help/pager.txt @ 31650:23391acfc421
py3: fix manifestdict.fastdelta() to be compatible with memoryview
This doesn't look nice, but a straightforward way to support Python 3.
bytes(m[start:end]) is needed because a memoryview doesn't support ordering
operations. On Python 2, m[start:end] returns a bytes object even if m is
a buffer, so calling bytes() should involve no additional copy.
I'm tired of trying cleaner alternatives, including:
a. extend memoryview to be compatible with buffer type
=> memoryview is not an acceptable base type
b. wrap memoryview by buffer-like class
=> zlib complains it isn't bytes-like
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 26 Mar 2017 19:06:48 +0900 |
parents | 88203f26ea57 |
children | bf5e13e38390 |
comparison
equal
deleted
inserted
replaced
31649:4bc3e55cf386 | 31650:23391acfc421 |
---|