[libgda] GdaDataModelIter: improve datamodel property get
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaDataModelIter: improve datamodel property get
- Date: Tue, 12 Feb 2019 01:51:44 +0000 (UTC)
commit 81f0b3b9078534dd0062678c1331615f87f54021
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Mon Feb 11 17:53:31 2019 -0600
GdaDataModelIter: improve datamodel property get
libgda/gda-data-model-iter.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/libgda/gda-data-model-iter.c b/libgda/gda-data-model-iter.c
index 87a381687..6bdca8701 100644
--- a/libgda/gda-data-model-iter.c
+++ b/libgda/gda-data-model-iter.c
@@ -611,9 +611,8 @@ gda_data_model_iter_get_property (GObject *object,
case PROP_DATA_MODEL:
{
GObject *obj = g_weak_ref_get (&priv->data_model);
- g_value_set_object (value, obj);
if (obj != NULL) {
- g_object_unref (obj);
+ g_value_take_object (value, obj);
}
}
break;
@@ -621,9 +620,8 @@ gda_data_model_iter_get_property (GObject *object,
{
g_warning ("Deprecated property, not to be used");
GObject *obj = g_weak_ref_get (&priv->data_model);
- g_value_set_object (value, obj);
if (obj != NULL) {
- g_object_unref (obj);
+ g_value_take_object (value, obj);
}
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]