]> arthur.barton.de Git - bup.git/commitdiff
write_sparsely bitmatch set_linux_file_attr: accommodate python 3
authorRob Browning <rlb@defaultvalue.org>
Mon, 30 Dec 2019 19:22:20 +0000 (13:22 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 2 Feb 2020 18:15:09 +0000 (12:15 -0600)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c

index f0abda3b5bfc71476326645840a07b5ccbc5de88..b29c54cb782e16882d5043149c88423b37c980e9 100644 (file)
@@ -497,7 +497,7 @@ static PyObject *bup_write_sparsely(PyObject *self, PyObject *args)
     unsigned char *buf = NULL;
     Py_ssize_t sbuf_len;
     PyObject *py_min_sparse_len, *py_prev_sparse_len;
-    if (!PyArg_ParseTuple(args, "it#OO",
+    if (!PyArg_ParseTuple(args, "i" rbuf_argf "OO",
                           &fd, &buf, &sbuf_len,
                           &py_min_sparse_len, &py_prev_sparse_len))
        return NULL;
@@ -615,7 +615,7 @@ static PyObject *bitmatch(PyObject *self, PyObject *args)
     Py_ssize_t byte;
     int bit;
 
-    if (!PyArg_ParseTuple(args, "t#t#", &buf1, &len1, &buf2, &len2))
+    if (!PyArg_ParseTuple(args, rbuf_argf rbuf_argf, &buf1, &len1, &buf2, &len2))
        return NULL;
     
     bit = 0;