summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-04-18 09:11:22 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-05 14:19:19 -0400
commitfdb41b9f7088ae4fcb1d5b87362c7a16ff51861f (patch)
tree551045d5c91387fe21bf4a22225caf954b5b9d84
parent68db467eea78b2b2f02fd29641b3dfa3889fd60f (diff)
downloadpython-systemd-fdb41b9f7088ae4fcb1d5b87362c7a16ff51861f.tar.gz
move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
-rw-r--r--systemd/_daemon.c2
-rw-r--r--systemd/_reader.c10
-rw-r--r--systemd/id128.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/systemd/_daemon.c b/systemd/_daemon.c
index 8f93d91..ce20649 100644
--- a/systemd/_daemon.c
+++ b/systemd/_daemon.c
@@ -244,7 +244,7 @@ static PyObject* is_socket_unix(PyObject *self, PyObject *args) {
Py_ssize_t length = 0;
#if PY_MAJOR_VERSION >=3 && PY_MINOR_VERSION >= 1
- PyObject _cleanup_Py_DECREF_ *_path = NULL;
+ _cleanup_Py_DECREF_ PyObject *_path = NULL;
if (!PyArg_ParseTuple(args, "i|iiO&:_is_socket_unix",
&fd, &type, &listening, Unicode_FSConverter, &_path))
return NULL;
diff --git a/systemd/_reader.c b/systemd/_reader.c
index 14f8a40..05993b3 100644
--- a/systemd/_reader.c
+++ b/systemd/_reader.c
@@ -429,7 +429,7 @@ static PyObject* Reader_get_all(Reader *self, PyObject *args)
return NULL;
SD_JOURNAL_FOREACH_DATA(self->j, msg, msg_len) {
- PyObject _cleanup_Py_DECREF_ *key = NULL, *value = NULL;
+ _cleanup_Py_DECREF_ PyObject *key = NULL, *value = NULL;
r = extract(msg, msg_len, &key, &value);
if (r < 0)
@@ -443,7 +443,7 @@ static PyObject* Reader_get_all(Reader *self, PyObject *args)
if (r < 0)
goto error;
} else {
- PyObject _cleanup_Py_DECREF_ *tmp_list = PyList_New(0);
+ _cleanup_Py_DECREF_ PyObject *tmp_list = PyList_New(0);
if (!tmp_list)
goto error;
@@ -760,7 +760,7 @@ PyDoc_STRVAR(Reader_get_cursor__doc__,
"Wraps sd_journal_get_cursor(). See man:sd_journal_get_cursor(3).");
static PyObject* Reader_get_cursor(Reader *self, PyObject *args)
{
- char _cleanup_free_ *cursor = NULL;
+ _cleanup_free_ char *cursor = NULL;
int r;
assert(self);
@@ -846,7 +846,7 @@ PyDoc_STRVAR(Reader_get_catalog__doc__,
static PyObject* Reader_get_catalog(Reader *self, PyObject *args)
{
int r;
- char _cleanup_free_ *msg = NULL;
+ _cleanup_free_ char *msg = NULL;
assert(self);
assert(!args);
@@ -885,7 +885,7 @@ static PyObject* get_catalog(PyObject *self, PyObject *args)
int r;
char *id_ = NULL;
sd_id128_t id;
- char _cleanup_free_ *msg = NULL;
+ _cleanup_free_ char *msg = NULL;
assert(!self);
assert(args);
diff --git a/systemd/id128.c b/systemd/id128.c
index a9611c4..1c2fe5d 100644
--- a/systemd/id128.c
+++ b/systemd/id128.c
@@ -52,7 +52,7 @@ PyDoc_STRVAR(get_boot__doc__,
);
static PyObject* make_uuid(sd_id128_t id) {
- PyObject _cleanup_Py_DECREF_
+ _cleanup_Py_DECREF_ PyObject
*uuid = NULL, *UUID = NULL, *bytes = NULL,
*args = NULL, *kwargs = NULL;