]> arthur.barton.de Git - bup.git/commitdiff
firstword extract_bits: accommodate python 3
authorRob Browning <rlb@defaultvalue.org>
Sun, 29 Dec 2019 22:22:40 +0000 (16:22 -0600)
committerRob Browning <rlb@defaultvalue.org>
Mon, 20 Jan 2020 21:17:44 +0000 (15:17 -0600)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c

index aadcbe4e149cd4a8584365def0d0d5dbb753839f..bccf4969b4de4431266a01ec1c9b7538630f059d 100644 (file)
@@ -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)