From c7dfd218eaf3495869b0349d08ae32d5cc74c5cd Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 29 Nov 2023 12:02:04 +0000 Subject: [PATCH] gerror: Add missing (scope forever) annotations Extended error domains can never be unregistered, so these closures have to be around forever. Fixes some g-ir-scanner warnings. Signed-off-by: Philip Withnall Helps: #3037 --- glib/gerror.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/glib/gerror.c b/glib/gerror.c index 392cb6ff1..25be13f8d 100644 --- a/glib/gerror.c +++ b/glib/gerror.c @@ -106,9 +106,9 @@ error_domain_register (GQuark error_quark, * g_error_domain_register_static: * @error_type_name: static string to create a #GQuark from * @error_type_private_size: size of the private error data in bytes - * @error_type_init: function initializing fields of the private error data - * @error_type_copy: function copying fields of the private error data - * @error_type_clear: function freeing fields of the private error data + * @error_type_init: (scope forever): function initializing fields of the private error data + * @error_type_copy: (scope forever): function copying fields of the private error data + * @error_type_clear: (scope forever): function freeing fields of the private error data * * This function registers an extended #GError domain. * @@ -159,9 +159,9 @@ g_error_domain_register_static (const char *error_type_name, * g_error_domain_register: * @error_type_name: string to create a #GQuark from * @error_type_private_size: size of the private error data in bytes - * @error_type_init: function initializing fields of the private error data - * @error_type_copy: function copying fields of the private error data - * @error_type_clear: function freeing fields of the private error data + * @error_type_init: (scope forever): function initializing fields of the private error data + * @error_type_copy: (scope forever): function copying fields of the private error data + * @error_type_clear: (scope forever): function freeing fields of the private error data * * This function registers an extended #GError domain. * @error_type_name will be duplicated. Otherwise does the same as