summaryrefslogtreecommitdiff
path: root/src/analysis/types/encaps.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/types/encaps.c')
-rw-r--r--src/analysis/types/encaps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/analysis/types/encaps.c b/src/analysis/types/encaps.c
index bfb4e57..8d0d7eb 100644
--- a/src/analysis/types/encaps.c
+++ b/src/analysis/types/encaps.c
@@ -165,8 +165,7 @@ static void g_encapsulated_type_init(GEncapsulatedType *type)
static void g_encapsulated_type_dispose(GEncapsulatedType *type)
{
- if (type->child != NULL)
- g_object_unref(G_OBJECT(type->child));
+ g_clear_object(&type->child);
G_OBJECT_CLASS(g_encapsulated_type_parent_class)->dispose(G_OBJECT(type));
@@ -246,7 +245,8 @@ static bool g_encapsulated_type_load(GEncapsulatedType *type, GObjectStorage *st
type->type = value;
- result = g_serializable_object_load(G_SERIALIZABLE_OBJECT(type->child), storage, pbuf);
+ type->child = G_DATA_TYPE(g_object_storage_unpack_object(storage, "types", pbuf));
+ result = (type->child != NULL);
if (!result) goto exit;
result = unpack_uleb128(&value, pbuf);
@@ -285,7 +285,7 @@ static bool g_encapsulated_type_store(const GEncapsulatedType *type, GObjectStor
result = pack_uleb128((uleb128_t []){ g_encapsulated_type_get_etype(type) }, pbuf);
if (!result) goto exit;
- result = g_serializable_object_store(G_SERIALIZABLE_OBJECT(type->child), storage, pbuf);
+ result = g_object_storage_pack_object(storage, "types", G_SERIALIZABLE_OBJECT(type->child), pbuf);
if (!result) goto exit;
result = pack_uleb128((uleb128_t []){ type->dimension }, pbuf);