From 6f5ec9552ca169b66b338698850a125151e3599c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 4 Jul 2012 19:36:26 +0100 Subject: Re-indent now that the indentation is unecessary --- _dbus_bindings/server.c | 61 +++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/_dbus_bindings/server.c b/_dbus_bindings/server.c index 2d624a9..07652c4 100644 --- a/_dbus_bindings/server.c +++ b/_dbus_bindings/server.c @@ -100,48 +100,45 @@ DBusPyServer_set_auth_mechanisms(Server *self, length = PySequence_Fast_GET_SIZE(fast_seq); - /* scope for list */ - { - list = calloc (length + 1, sizeof (char *)); + list = calloc (length + 1, sizeof (char *)); - if (!list) { - PyErr_NoMemory(); - goto finally; - } + if (!list) { + PyErr_NoMemory(); + goto finally; + } - if (!(references = PyTuple_New(length))) - goto finally; + if (!(references = PyTuple_New(length))) + goto finally; - for (i = 0; i < length; ++i) { - PyObject *am, *am_as_bytes; + for (i = 0; i < length; ++i) { + PyObject *am, *am_as_bytes; - am = PySequence_Fast_GET_ITEM(auth_mechanisms, i); - if (!am) - goto finally; + am = PySequence_Fast_GET_ITEM(auth_mechanisms, i); + if (!am) + goto finally; - if (PyUnicode_Check(am)) { - am_as_bytes = PyUnicode_AsUTF8String(am); - if (!am_as_bytes) - goto finally; - } - else { - am_as_bytes = am; - Py_INCREF(am_as_bytes); - } - list[i] = PyBytes_AsString(am_as_bytes); - if (!list[i]) + if (PyUnicode_Check(am)) { + am_as_bytes = PyUnicode_AsUTF8String(am); + if (!am_as_bytes) goto finally; - - PyTuple_SET_ITEM(references, i, am_as_bytes); } + else { + am_as_bytes = am; + Py_INCREF(am_as_bytes); + } + list[i] = PyBytes_AsString(am_as_bytes); + if (!list[i]) + goto finally; - list[length] = NULL; - - Py_BEGIN_ALLOW_THREADS - dbus_server_set_auth_mechanisms(self->server, list); - Py_END_ALLOW_THREADS + PyTuple_SET_ITEM(references, i, am_as_bytes); } + list[length] = NULL; + + Py_BEGIN_ALLOW_THREADS + dbus_server_set_auth_mechanisms(self->server, list); + Py_END_ALLOW_THREADS + ret = TRUE; finally: -- cgit v1.2.1