gdbus: Make g_dbus_proxy_get_path take const proxy
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 14 Sep 2020 19:43:09 +0000 (12:43 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:32 +0000 (19:08 +0530)
This makes g_dbus_proxy_get_path take const proxy since it doesn't
change anything on the proxy and avoid pointless casts.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
gdbus/client.c
gdbus/gdbus.h

index dd5d2eb..37b4481 100755 (executable)
@@ -692,7 +692,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;
index df66e79..4bf87b7 100755 (executable)
@@ -339,7 +339,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,