[amtk] Do not set G_GNUC_CONST for get_type() functions
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [amtk] Do not set G_GNUC_CONST for get_type() functions
- Date: Wed, 1 Jun 2022 13:02:09 +0000 (UTC)
commit f5c809a362d0d28152110067bbc25867470cd38e
Author: Sébastien Wilmet <sebastien wilmet gmail com>
Date: Thu Sep 9 02:28:14 2021 +0200
Do not set G_GNUC_CONST for get_type() functions
IIRC G_GNUC_CONST means something else: according to its API, we should
not use it for get_type() functions.
It's an optimization that happens to work, currently at least, and with
GCC. But there are no guarantees that it will still work in the distant
future.
And, the less code the better, it's slightly easier to understand.
amtk/amtk-action-info-central-store.h | 2 +-
amtk/amtk-action-info.h | 2 +-
amtk/amtk-application-window.h | 2 +-
amtk/amtk-menu-shell.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/amtk/amtk-action-info-central-store.h b/amtk/amtk-action-info-central-store.h
index 60ae228..2102acf 100644
--- a/amtk/amtk-action-info-central-store.h
+++ b/amtk/amtk-action-info-central-store.h
@@ -54,7 +54,7 @@ struct _AmtkActionInfoCentralStoreClass
};
_AMTK_EXTERN
-GType amtk_action_info_central_store_get_type (void) G_GNUC_CONST;
+GType amtk_action_info_central_store_get_type (void);
_AMTK_EXTERN
AmtkActionInfoCentralStore *
diff --git a/amtk/amtk-action-info.h b/amtk/amtk-action-info.h
index 96a4ea7..e484501 100644
--- a/amtk/amtk-action-info.h
+++ b/amtk/amtk-action-info.h
@@ -63,7 +63,7 @@ struct _AmtkActionInfoEntry
};
_AMTK_EXTERN
-GType amtk_action_info_get_type (void) G_GNUC_CONST;
+GType amtk_action_info_get_type (void);
_AMTK_EXTERN
AmtkActionInfo * amtk_action_info_new (void);
diff --git a/amtk/amtk-application-window.h b/amtk/amtk-application-window.h
index 8f6875c..c635ddf 100644
--- a/amtk/amtk-application-window.h
+++ b/amtk/amtk-application-window.h
@@ -54,7 +54,7 @@ struct _AmtkApplicationWindowClass
};
_AMTK_EXTERN
-GType amtk_application_window_get_type (void) G_GNUC_CONST;
+GType amtk_application_window_get_type (void);
_AMTK_EXTERN
AmtkApplicationWindow * amtk_application_window_get_from_gtk_application_window (GtkApplicationWindow
*gtk_window);
diff --git a/amtk/amtk-menu-shell.h b/amtk/amtk-menu-shell.h
index fa24782..b252683 100644
--- a/amtk/amtk-menu-shell.h
+++ b/amtk/amtk-menu-shell.h
@@ -62,7 +62,7 @@ struct _AmtkMenuShellClass
};
_AMTK_EXTERN
-GType amtk_menu_shell_get_type (void) G_GNUC_CONST;
+GType amtk_menu_shell_get_type (void);
_AMTK_EXTERN
AmtkMenuShell * amtk_menu_shell_get_from_gtk_menu_shell (GtkMenuShell *gtk_menu_shell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]