From 3294507728a4af6b547bb5816b21bc9cc6859e50 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 29 Dec 2019 16:22:40 -0600 Subject: [PATCH] firstword extract_bits: accommodate python 3 Signed-off-by: Rob Browning Tested-by: Rob Browning --- lib/bup/_helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index aadcbe4..bccf496 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -617,7 +617,7 @@ static PyObject *firstword(PyObject *self, PyObject *args) Py_ssize_t len = 0; uint32_t v; - if (!PyArg_ParseTuple(args, "t#", &buf, &len)) + if (!PyArg_ParseTuple(args, rbuf_argf, &buf, &len)) return NULL; if (len < 4) @@ -795,7 +795,7 @@ static PyObject *extract_bits(PyObject *self, PyObject *args) Py_ssize_t len = 0; int nbits = 0; - if (!PyArg_ParseTuple(args, "t#i", &buf, &len, &nbits)) + if (!PyArg_ParseTuple(args, rbuf_argf "i", &buf, &len, &nbits)) return NULL; if (len < 4) -- 2.39.2