]> arthur.barton.de Git - bup.git/commitdiff
Use Py_RETURN_TRUE in py_lutimes() and py_set_linux_file_attr().
authorRob Browning <rlb@defaultvalue.org>
Wed, 22 Sep 2010 01:34:50 +0000 (20:34 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 22 Sep 2010 02:24:19 +0000 (19:24 -0700)
Use Py_RETURN_TRUE in py_lutimes() and py_set_linux_file_attr() so
that the reference counting is handled correctly.

Remove orphaned, static (and empty) set_linux_file_attr().

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

index 1d9d7defb3b32b58a834d6d0fd1845c69a946d4a..0c9aae3c2bfdec975d42c1c70bdac91a1e457f55 100644 (file)
@@ -200,11 +200,6 @@ static PyObject *fadvise_done(PyObject *self, PyObject *args)
 }
 
 
-static int set_linux_file_attr(const char *path, unsigned long attr)
-{
-}
-
-
 static PyObject *py_get_linux_file_attr(PyObject *self, PyObject *args)
 {
     int rc;
@@ -254,7 +249,7 @@ static PyObject *py_set_linux_file_attr(PyObject *self, PyObject *args)
     }
 
     close(fd);
-    return Py_True;
+    Py_RETURN_TRUE;
 }
 
 
@@ -305,7 +300,7 @@ static PyObject *py_lutimes(PyObject *self, PyObject *args)
     if(rc != 0)
         return PyErr_SetFromErrnoWithFilename(PyExc_IOError, filename);
 
-    return Py_True;
+    Py_RETURN_TRUE;
 }