diff options
Diffstat (limited to 'src/analysis/types/literal.c')
-rw-r--r-- | src/analysis/types/literal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/analysis/types/literal.c b/src/analysis/types/literal.c index 2a4aa45..4529411 100644 --- a/src/analysis/types/literal.c +++ b/src/analysis/types/literal.c @@ -152,8 +152,7 @@ static void g_literal_type_init(GLiteralType *type) static void g_literal_type_dispose(GLiteralType *type) { - if (type->orig != NULL) - g_object_unref(G_OBJECT(type->orig)); + g_clear_object(&type->orig); G_OBJECT_CLASS(g_literal_type_parent_class)->dispose(G_OBJECT(type)); @@ -234,7 +233,8 @@ static bool g_literal_type_load(GLiteralType *type, GObjectStorage *storage, pac result = G_DATA_TYPE_CLASS(g_literal_type_parent_class)->load(G_DATA_TYPE(type), storage, pbuf); if (!result) goto exit; - result = g_serializable_object_load(G_SERIALIZABLE_OBJECT(type->orig), storage, pbuf); + type->orig = G_DATA_TYPE(g_object_storage_unpack_object(storage, "types", pbuf)); + result = (type->orig != NULL); if (!result) goto exit; if (g_basic_type_get_base(G_BASIC_TYPE(type->orig)) == BTP_FLOAT) @@ -270,7 +270,7 @@ static bool g_literal_type_store(const GLiteralType *type, GObjectStorage *stora result = G_DATA_TYPE_CLASS(g_literal_type_parent_class)->store(G_DATA_TYPE(type), storage, pbuf); if (!result) goto exit; - result = g_serializable_object_store(G_SERIALIZABLE_OBJECT(type->orig), storage, pbuf); + result = g_object_storage_pack_object(storage, "types", G_SERIALIZABLE_OBJECT(type->orig), pbuf); if (!result) goto exit; if (g_basic_type_get_base(G_BASIC_TYPE(type->orig)) == BTP_FLOAT) |