]> arthur.barton.de Git - bup.git/commit
merge_into: accommodate python 3
authorRob Browning <rlb@defaultvalue.org>
Mon, 30 Dec 2019 19:22:20 +0000 (13:22 -0600)
committerRob Browning <rlb@defaultvalue.org>
Mon, 20 Jan 2020 21:17:44 +0000 (15:17 -0600)
commit21a6e99f4a4d0c5cc6a6dbcafb13cb8074090bd1
tree907c483c2d77d184778a753bf18b3e67ccb7b3fc
parent3294507728a4af6b547bb5816b21bc9cc6859e50
merge_into: accommodate python 3

Switch to Py_buffers to accommodate python 3, use malloc/calloc to
avoid potentially involving the GIL, and check allocation failures.

Thanks to Johannes Berg for pointing out a potential overflow on the C
side -- fixed by adjusting checked_malloc() to accept the same
arguments as checked_calloc().

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