From fa13abdcdc238a9e97638abc485a9803ca854a3f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 25 Feb 2009 11:27:57 -0500 Subject: [PATCH] Bug 19927 - Use const for GError * param we're not modifying This makes it clearer we're not taking ownership of the error, and interoperates more nicely with functions which provide const GError *. --- dbus/dbus-glib.h | 2 +- dbus/dbus-gobject.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-glib.h b/dbus/dbus-glib.h index aa7c793..9a12378 100644 --- a/dbus/dbus-glib.h +++ b/dbus/dbus-glib.h @@ -308,7 +308,7 @@ typedef struct _DBusGMethodInvocation DBusGMethodInvocation; void dbus_g_method_return (DBusGMethodInvocation *context, ...); -void dbus_g_method_return_error (DBusGMethodInvocation *context, GError *error); +void dbus_g_method_return_error (DBusGMethodInvocation *context, const GError *error); /* Probably possible to replace this with a closure */ typedef struct { diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index 00cf56b..2cc8287 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -2376,7 +2376,7 @@ dbus_g_method_return (DBusGMethodInvocation *context, ...) * This function also frees the sending context. */ void -dbus_g_method_return_error (DBusGMethodInvocation *context, GError *error) +dbus_g_method_return_error (DBusGMethodInvocation *context, const GError *error) { DBusMessage *reply; -- 1.6.0.6