From: Rob Browning Date: Wed, 22 Sep 2010 01:34:50 +0000 (-0500) Subject: Use Py_RETURN_TRUE in py_lutimes() and py_set_linux_file_attr(). X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a890ad73554971b6d4e1c7608158eb5172aee8d7;p=packages%2Fb%2Fbup.git Use Py_RETURN_TRUE in py_lutimes() and py_set_linux_file_attr(). 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 --- diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index 1d9d7de..0c9aae3 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -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; }