summaryrefslogtreecommitdiff
path: root/_dbus_glib_bindings
diff options
context:
space:
mode:
authorSimon McVittie <smcv@celebrin.pseudorandom.co.uk>2006-11-14 14:00:33 +0000
committerSimon McVittie <smcv@celebrin.pseudorandom.co.uk>2006-11-14 14:00:33 +0000
commitec4382fc301ddd60c4abfa0175e912880980de68 (patch)
tree09e64bef7b50397233c457042d0c7dddffd0f55d /_dbus_glib_bindings
parent7e742ca5b5543ea290175f9351053f9ad6cfd492 (diff)
downloaddbus-python-ec4382fc301ddd60c4abfa0175e912880980de68.tar.gz
Annotate UNUSED arguments
Diffstat (limited to '_dbus_glib_bindings')
-rw-r--r--_dbus_glib_bindings/module.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/_dbus_glib_bindings/module.c b/_dbus_glib_bindings/module.c
index 4a225f2..0dbe9a7 100644
--- a/_dbus_glib_bindings/module.c
+++ b/_dbus_glib_bindings/module.c
@@ -27,12 +27,22 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#if defined(__GNUC__)
+# if __GNUC__ >= 3
+# define UNUSED __attribute__((__unused__))
+# else
+# define UNUSED /*nothing*/
+# endif
+#else
+# define UNUSED /*nothing*/
+#endif
+
PyDoc_STRVAR(module_doc, "");
PyDoc_STRVAR(setup_with_g_main__doc__,
"setup_with_g_main(conn: dbus.Connection)");
static PyObject *
-setup_with_g_main (PyObject *unused, PyObject *args)
+setup_with_g_main (PyObject *always_null UNUSED, PyObject *args)
{
DBusConnection *dbc;
PyObject *conn;
@@ -47,7 +57,7 @@ setup_with_g_main (PyObject *unused, PyObject *args)
PyDoc_STRVAR(gthreads_init__doc__,
"gthreads_init()");
static PyObject *
-gthreads_init (PyObject *unused, PyObject *also_unused)
+gthreads_init (PyObject *always_null UNUSED, PyObject *no_args UNUSED)
{
dbus_g_thread_init();
Py_RETURN_NONE;