From fdfe130edde53084d4a0dea2e5d58940e6b30e1b Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 28 Apr 2023 12:13:08 -0700 Subject: [PATCH] libsysprof-analyze: add missing autoptr cleanup funcs --- src/libsysprof-analyze/sysprof-document-allocation.h | 2 ++ src/libsysprof-analyze/sysprof-document-exit.h | 2 ++ src/libsysprof-analyze/sysprof-document-fork.h | 2 ++ src/libsysprof-analyze/sysprof-document-frame.h | 4 ++++ src/libsysprof-analyze/sysprof-document-log.h | 2 ++ src/libsysprof-analyze/sysprof-document-mark.h | 2 ++ src/libsysprof-analyze/sysprof-document-metadata.h | 2 ++ src/libsysprof-analyze/sysprof-document-mmap.h | 2 ++ src/libsysprof-analyze/sysprof-document-process.h | 2 ++ src/libsysprof-analyze/sysprof-document-sample.h | 2 ++ 10 files changed, 22 insertions(+) diff --git a/src/libsysprof-analyze/sysprof-document-allocation.h b/src/libsysprof-analyze/sysprof-document-allocation.h index c8b91d0f..9744bf6b 100644 --- a/src/libsysprof-analyze/sysprof-document-allocation.h +++ b/src/libsysprof-analyze/sysprof-document-allocation.h @@ -43,4 +43,6 @@ int sysprof_document_allocation_get_tid (SysprofDocumentAllocation *sel SYSPROF_AVAILABLE_IN_ALL gboolean sysprof_document_allocation_is_free (SysprofDocumentAllocation *self); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentAllocation, g_object_unref) + G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-document-exit.h b/src/libsysprof-analyze/sysprof-document-exit.h index 3c902cf2..b9f351eb 100644 --- a/src/libsysprof-analyze/sysprof-document-exit.h +++ b/src/libsysprof-analyze/sysprof-document-exit.h @@ -35,5 +35,7 @@ typedef struct _SysprofDocumentExitClass SysprofDocumentExitClass; SYSPROF_AVAILABLE_IN_ALL GType sysprof_document_exit_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentExit, g_object_unref) + G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-document-fork.h b/src/libsysprof-analyze/sysprof-document-fork.h index 021a157e..cd8caef0 100644 --- a/src/libsysprof-analyze/sysprof-document-fork.h +++ b/src/libsysprof-analyze/sysprof-document-fork.h @@ -37,5 +37,7 @@ GType sysprof_document_fork_get_type (void) G_GNUC_CONST; SYSPROF_AVAILABLE_IN_ALL int sysprof_document_fork_get_child_pid (SysprofDocumentFork *self); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentFork, g_object_unref) + G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-document-frame.h b/src/libsysprof-analyze/sysprof-document-frame.h index ffc31120..46d98055 100644 --- a/src/libsysprof-analyze/sysprof-document-frame.h +++ b/src/libsysprof-analyze/sysprof-document-frame.h @@ -22,6 +22,8 @@ #include +#include + G_BEGIN_DECLS #define SYSPROF_TYPE_DOCUMENT_FRAME (sysprof_document_frame_get_type()) @@ -41,4 +43,6 @@ int sysprof_document_frame_get_pid (SysprofDocumentFrame *self); SYSPROF_AVAILABLE_IN_ALL gint64 sysprof_document_frame_get_time (SysprofDocumentFrame *self); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentFrame, g_object_unref) + G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-document-log.h b/src/libsysprof-analyze/sysprof-document-log.h index 0cbf436d..191c9d91 100644 --- a/src/libsysprof-analyze/sysprof-document-log.h +++ b/src/libsysprof-analyze/sysprof-document-log.h @@ -41,4 +41,6 @@ GLogLevelFlags sysprof_document_log_get_severity (SysprofDocumentLog *self); SYSPROF_AVAILABLE_IN_ALL const char *sysprof_document_log_get_domain (SysprofDocumentLog *self); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentLog, g_object_unref) + G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-document-mark.h b/src/libsysprof-analyze/sysprof-document-mark.h index a875af30..99bd7550 100644 --- a/src/libsysprof-analyze/sysprof-document-mark.h +++ b/src/libsysprof-analyze/sysprof-document-mark.h @@ -43,5 +43,7 @@ const char *sysprof_document_mark_get_name (SysprofDocumentMark *self); SYSPROF_AVAILABLE_IN_ALL const char *sysprof_document_mark_get_message (SysprofDocumentMark *self); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentMark, g_object_unref) + G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-document-metadata.h b/src/libsysprof-analyze/sysprof-document-metadata.h index f32bbe8c..de5672a7 100644 --- a/src/libsysprof-analyze/sysprof-document-metadata.h +++ b/src/libsysprof-analyze/sysprof-document-metadata.h @@ -39,5 +39,7 @@ const char *sysprof_document_metadata_get_id (SysprofDocumentMetadata *self); SYSPROF_AVAILABLE_IN_ALL const char *sysprof_document_metadata_get_value (SysprofDocumentMetadata *self); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentMetadata, g_object_unref) + G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-document-mmap.h b/src/libsysprof-analyze/sysprof-document-mmap.h index bdcbf870..0bbe3deb 100644 --- a/src/libsysprof-analyze/sysprof-document-mmap.h +++ b/src/libsysprof-analyze/sysprof-document-mmap.h @@ -46,4 +46,6 @@ guint64 sysprof_document_mmap_get_file_offset (SysprofDocumentMmap *self); SYSPROF_AVAILABLE_IN_ALL const char *sysprof_document_mmap_get_file (SysprofDocumentMmap *self); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentMmap, g_object_unref) + G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-document-process.h b/src/libsysprof-analyze/sysprof-document-process.h index c6da18db..5234eb7e 100644 --- a/src/libsysprof-analyze/sysprof-document-process.h +++ b/src/libsysprof-analyze/sysprof-document-process.h @@ -37,5 +37,7 @@ GType sysprof_document_process_get_type (void) G_GNUC_CONST; SYSPROF_AVAILABLE_IN_ALL const char *sysprof_document_process_get_command_line (SysprofDocumentProcess *self); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentProcess, g_object_unref) + G_END_DECLS diff --git a/src/libsysprof-analyze/sysprof-document-sample.h b/src/libsysprof-analyze/sysprof-document-sample.h index 9a8906da..6868fc84 100644 --- a/src/libsysprof-analyze/sysprof-document-sample.h +++ b/src/libsysprof-analyze/sysprof-document-sample.h @@ -39,4 +39,6 @@ guint sysprof_document_sample_get_depth (SysprofDocumentSample *self); SYSPROF_AVAILABLE_IN_ALL int sysprof_document_sample_get_tid (SysprofDocumentSample *self); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentSample, g_object_unref) + G_END_DECLS