static void gtd_object_finalize (GObject *object) { GtdObject *self = GTD_OBJECT (object); GtdObjectPrivate *priv = gtd_object_get_instance_private (self); g_clear_pointer (&priv->uid, g_free); G_OBJECT_CLASS (gtd_object_parent_class)->finalize (object); }
static void gtd_object_finalize (GObject *object) { GtdObject *self = GTD_OBJECT (object); GtdObjectPrivate *priv = gtd_object_get_instance_private (self); if (priv->uid) g_free (priv->uid); G_OBJECT_CLASS (gtd_object_parent_class)->finalize (object); }
static void gtd_object_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtdObject *self = GTD_OBJECT (object); switch (prop_id) { case PROP_UID: GTD_OBJECT_GET_CLASS (self)->set_uid (self, g_value_get_string (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } }
static void gtd_object_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtdObject *self = GTD_OBJECT (object); GtdObjectPrivate *priv = gtd_object_get_instance_private (self); switch (prop_id) { case PROP_READY: g_value_set_boolean (value, priv->ready); break; case PROP_UID: g_value_set_string (value, GTD_OBJECT_GET_CLASS (self)->get_uid (self)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } }