]> arthur.barton.de Git - bup.git/commit
hashsplit: replace join_bytes with cat_bytes
authorRob Browning <rlb@defaultvalue.org>
Fri, 3 Jan 2020 20:27:09 +0000 (14:27 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 2 Feb 2020 19:30:12 +0000 (13:30 -0600)
commitbd08128284ab3c4444f09071e7deeb3fb0684ce4
tree30e55a8d372c80912e18961a772c9d44ca81af90
parentbf67f94dd4f4096de4eee07a7dc377d6c889a016
hashsplit: replace join_bytes with cat_bytes

Add a C cat_bytes that can concatenate two bytes objects with offsets
and extents.  This allows us to have the same implementation for
python 2 and 3, to drop another use of buffer(), and may be handy in
the future, particularly given the expense of getting a buffer offset
in python 3 (i.e. memoryview() adds about ~200 bytes).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c
lib/bup/compat.py
lib/bup/hashsplit.py