From 8f3a62684d251354b0e3a690a57f82aa1ab266eb Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 14 Sep 2020 12:43:09 -0700 Subject: [PATCH] gdbus: Make g_dbus_proxy_get_path take const proxy This makes g_dbus_proxy_get_path take const proxy since it doesn't change anything on the proxy and avoid pointless casts. --- gdbus/client.c | 2 +- gdbus/gdbus.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbus/client.c b/gdbus/client.c index 86e1c7693..84e076994 100644 --- a/gdbus/client.c +++ b/gdbus/client.c @@ -693,7 +693,7 @@ void g_dbus_proxy_unref(GDBusProxy *proxy) g_free(proxy); } -const char *g_dbus_proxy_get_path(GDBusProxy *proxy) +const char *g_dbus_proxy_get_path(const GDBusProxy *proxy) { if (proxy == NULL) return NULL; diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h index 1a601c591..9bdff9eba 100644 --- a/gdbus/gdbus.h +++ b/gdbus/gdbus.h @@ -333,7 +333,7 @@ GDBusProxy *g_dbus_proxy_new(GDBusClient *client, const char *path, GDBusProxy *g_dbus_proxy_ref(GDBusProxy *proxy); void g_dbus_proxy_unref(GDBusProxy *proxy); -const char *g_dbus_proxy_get_path(GDBusProxy *proxy); +const char *g_dbus_proxy_get_path(const GDBusProxy *proxy); const char *g_dbus_proxy_get_interface(GDBusProxy *proxy); gboolean g_dbus_proxy_get_property(GDBusProxy *proxy, const char *name, -- 2.47.3