summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2020-01-27 17:25:38 -0500
committerAllen Winter <allen.winter@kdab.com>2020-01-27 17:25:38 -0500
commit9f96063962ffce9c8df07a77619757674f0e0aab (patch)
treee8104a9cf5ab2af7e5c1247e08bc48fd5ac14e41
parent2faf08be22990876303e098795423960191498ac (diff)
downloadlibical-git-9f96063962ffce9c8df07a77619757674f0e0aab.tar.gz
Revert "libical-glib: Replace usage of deprecated G_TYPE_INSTANCE_GET_PRIVATE()"
This reverts commit 144b57bfddf4606999d2ef57772023b323441866.
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/libical-glib/i-cal-object.c.in6
2 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 35a1e8a2..9adec38a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -371,7 +371,7 @@ if(ICAL_GLIB_VAPI)
endif()
endif()
-set(MIN_GLIB "2.38")
+set(MIN_GLIB "2.32")
set(MIN_LIBXML "2.7.3")
option(ICAL_GLIB "Build libical-glib interface. Requires glib ${MIN_GLIB} and libxml ${MIN_LIBXML} development packages or higher." True)
add_feature_info(
diff --git a/src/libical-glib/i-cal-object.c.in b/src/libical-glib/i-cal-object.c.in
index cd37c969..1f593a94 100644
--- a/src/libical-glib/i-cal-object.c.in
+++ b/src/libical-glib/i-cal-object.c.in
@@ -114,7 +114,7 @@ struct _ICalObjectPrivate
GSList *dependers; /* referenced GObject-s */
};
-G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(ICalObject, i_cal_object, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE(ICalObject, i_cal_object, G_TYPE_OBJECT)
enum
{
@@ -213,6 +213,8 @@ static void i_cal_object_class_init(ICalObjectClass * class)
{
GObjectClass *object_class;
+ g_type_class_add_private(class, sizeof(ICalObjectPrivate));
+
object_class = G_OBJECT_CLASS(class);
object_class->set_property = i_cal_object_set_property;
object_class->get_property = i_cal_object_get_property;
@@ -287,7 +289,7 @@ static void i_cal_object_class_init(ICalObjectClass * class)
static void i_cal_object_init(ICalObject *iobject)
{
- iobject->priv = i_cal_object_get_instance_private(iobject);
+ iobject->priv = G_TYPE_INSTANCE_GET_PRIVATE(iobject, I_CAL_TYPE_OBJECT, ICalObjectPrivate);
g_mutex_init(&iobject->priv->props_lock);
}