X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgdbusobjectproxy.c;h=97889251ec47a911ed804967f9e969b4b14361c4;hb=853692bdfd9f8a87aed70d21f643dc13b57c92d1;hp=e80641b69f161a2d899b6f488e582aab80f00b5e;hpb=eedb6d8366a9cf4e638fe34ebdca17b387e41ce5;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gdbusobjectproxy.c b/gio/gdbusobjectproxy.c index e80641b..9788925 100644 --- a/gio/gdbusobjectproxy.c +++ b/gio/gdbusobjectproxy.c @@ -13,9 +13,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. + * Public License along with this library; if not, see . * * Author: David Zeuthen */ @@ -62,7 +60,8 @@ enum static void dbus_object_interface_init (GDBusObjectIface *iface); G_DEFINE_TYPE_WITH_CODE (GDBusObjectProxy, g_dbus_object_proxy, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, dbus_object_interface_init)); + G_ADD_PRIVATE (GDBusObjectProxy) + G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, dbus_object_interface_init)) static void g_dbus_object_proxy_finalize (GObject *object) @@ -73,6 +72,8 @@ g_dbus_object_proxy_finalize (GObject *object) g_clear_object (&proxy->priv->connection); + g_free (proxy->priv->object_path); + g_mutex_clear (&proxy->priv->lock); if (G_OBJECT_CLASS (g_dbus_object_proxy_parent_class)->finalize != NULL) @@ -100,7 +101,7 @@ g_dbus_object_proxy_get_property (GObject *object, break; default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (_object, prop_id, pspec); + G_OBJECT_WARN_INVALID_PROPERTY_ID (proxy, prop_id, pspec); break; } } @@ -128,7 +129,7 @@ g_dbus_object_proxy_set_property (GObject *object, break; default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (_object, prop_id, pspec); + G_OBJECT_WARN_INVALID_PROPERTY_ID (proxy, prop_id, pspec); break; } } @@ -175,16 +176,12 @@ g_dbus_object_proxy_class_init (GDBusObjectProxyClass *klass) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); - - g_type_class_add_private (klass, sizeof (GDBusObjectProxyPrivate)); } static void g_dbus_object_proxy_init (GDBusObjectProxy *proxy) { - proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, - G_TYPE_DBUS_OBJECT_PROXY, - GDBusObjectProxyPrivate); + proxy->priv = g_dbus_object_proxy_get_instance_private (proxy); g_mutex_init (&proxy->priv->lock); proxy->priv->map_name_to_iface = g_hash_table_new_full (g_str_hash, g_str_equal,