summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2020-02-27 18:00:58 +0100
committerBastien Nocera <hadess@hadess.net>2020-02-27 18:44:35 +0100
commite273d9077504ff4340dc5a55516f961a324b4ab1 (patch)
tree871b17acb5219c4cb973febaa83a361e6d996e61
parentefd383cd99fc185288f52f199b97933dafaa7e3b (diff)
downloadtotem-pl-parser-e273d9077504ff4340dc5a55516f961a324b4ab1.tar.gz
plparser: Add g_auto cleanup support
-rw-r--r--plparse/totem-pl-parser.h4
-rw-r--r--plparse/totem-pl-playlist.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/plparse/totem-pl-parser.h b/plparse/totem-pl-parser.h
index b36d8f0..e37dcfe 100644
--- a/plparse/totem-pl-parser.h
+++ b/plparse/totem-pl-parser.h
@@ -69,6 +69,8 @@ typedef struct {
TotemPlParserPrivate *priv;
} TotemPlParser;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(TotemPlParser, g_object_unref)
+
/* Known metadata fields */
/**
@@ -395,6 +397,8 @@ typedef GHashTable TotemPlParserMetadata;
GType totem_pl_parser_metadata_get_type (void) G_GNUC_CONST;
#define TOTEM_TYPE_PL_PARSER_METADATA (totem_pl_parser_metadata_get_type())
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(TotemPlParserMetadata, g_hash_table_destroy)
+
G_END_DECLS
#endif /* TOTEM_PL_PARSER_H */
diff --git a/plparse/totem-pl-playlist.h b/plparse/totem-pl-playlist.h
index b266ea6..5263bd5 100644
--- a/plparse/totem-pl-playlist.h
+++ b/plparse/totem-pl-playlist.h
@@ -41,6 +41,8 @@ typedef struct {
GObject parent_instance;
} TotemPlPlaylist;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(TotemPlPlaylist, g_object_unref)
+
/**
* TotemPlPlaylistClass:
* @parent_class: the parent class