diff options
author | Přemysl Janouch <p@janouch.name> | 2020-04-15 06:56:58 +0200 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2020-04-15 07:00:36 +0200 |
commit | 1289c98ca8e3ec32f133a284569ea09ba7be4d1e (patch) | |
tree | ee0790ba9a38e0f381b28a4c5682845f0ca78716 /src/stardict.c | |
parent | fcc0c3ef2d90603776c915335ed8bacf678cb278 (diff) | |
download | tdv-1289c98ca8e3ec32f133a284569ea09ba7be4d1e.tar.gz tdv-1289c98ca8e3ec32f133a284569ea09ba7be4d1e.tar.xz tdv-1289c98ca8e3ec32f133a284569ea09ba7be4d1e.zip |
Bump to GLib 2.38 because of deprecation warnings
Diffstat (limited to 'src/stardict.c')
-rw-r--r-- | src/stardict.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/stardict.c b/src/stardict.c index 8299d8b..a4c3b70 100644 --- a/src/stardict.c +++ b/src/stardict.c @@ -392,7 +392,8 @@ struct stardict_dict_private gsize dict_length; //!< Length of the dict data in bytes }; -G_DEFINE_TYPE (StardictDict, stardict_dict, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_CODE (StardictDict, stardict_dict, G_TYPE_OBJECT, + G_ADD_PRIVATE (StardictDict)) static void stardict_dict_finalize (GObject *self) @@ -426,15 +427,13 @@ stardict_dict_finalize (GObject *self) static void stardict_dict_class_init (StardictDictClass *klass) { - g_type_class_add_private (klass, sizeof (StardictDictPrivate)); G_OBJECT_CLASS (klass)->finalize = stardict_dict_finalize; } static void stardict_dict_init (StardictDict *self) { - self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, - STARDICT_TYPE_DICT, StardictDictPrivate); + self->priv = stardict_dict_get_instance_private (self); } /// Load a StarDict dictionary. |