[totem-pl-parser/wip/hadess/sync-saving-test: 1/2] plparser: Add g_auto cleanup support
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser/wip/hadess/sync-saving-test: 1/2] plparser: Add g_auto cleanup support
- Date: Thu, 27 Feb 2020 17:45:09 +0000 (UTC)
commit e273d9077504ff4340dc5a55516f961a324b4ab1
Author: Bastien Nocera <hadess hadess net>
Date: Thu Feb 27 18:00:58 2020 +0100
plparser: Add g_auto cleanup support
plparse/totem-pl-parser.h | 4 ++++
plparse/totem-pl-playlist.h | 2 ++
2 files changed, 6 insertions(+)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]