diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-10-24 00:49:18 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-10-24 00:49:18 +0800 |
commit | 0e53172e606f1a8857061cad638bed51fbcc6fb1 (patch) | |
tree | b50be36b460310cf3847a52a38f8ce344560624b /lib | |
parent | 786d8d71d03f87108bdfa13d3fa194347ea2ee0d (diff) | |
download | gsoc2013-epiphany-0e53172e606f1a8857061cad638bed51fbcc6fb1.tar gsoc2013-epiphany-0e53172e606f1a8857061cad638bed51fbcc6fb1.tar.gz gsoc2013-epiphany-0e53172e606f1a8857061cad638bed51fbcc6fb1.tar.bz2 gsoc2013-epiphany-0e53172e606f1a8857061cad638bed51fbcc6fb1.tar.lz gsoc2013-epiphany-0e53172e606f1a8857061cad638bed51fbcc6fb1.tar.xz gsoc2013-epiphany-0e53172e606f1a8857061cad638bed51fbcc6fb1.tar.zst gsoc2013-epiphany-0e53172e606f1a8857061cad638bed51fbcc6fb1.zip |
Annotate "if (type == 0)" in get_type functions with G_UNLIKELY, like the
2004-10-23 Christian Persch <chpe@cvs.gnome.org>
* embed/downloader-view.c: (downloader_view_get_type):
* embed/ephy-command-manager.c: (ephy_command_manager_get_type):
* embed/ephy-cookie-manager.c: (ephy_cookie_get_type),
(ephy_cookie_manager_get_type):
* embed/ephy-download.c: (ephy_download_get_type):
* embed/ephy-embed-dialog.c: (ephy_embed_dialog_get_type):
* embed/ephy-embed-event.c: (ephy_embed_event_get_type):
* embed/ephy-embed-persist.c: (ephy_embed_persist_get_type):
* embed/ephy-embed-shell.c: (ephy_embed_shell_get_type):
* embed/ephy-embed-single.c: (ephy_embed_single_get_type):
* embed/ephy-embed.c: (ephy_embed_get_type):
* embed/ephy-encodings.c: (ephy_encodings_get_type):
* embed/ephy-favicon-cache.c: (ephy_favicon_cache_get_type):
* embed/ephy-history.c: (ephy_history_get_type):
* embed/ephy-password-manager.c: (ephy_password_info_get_type),
(ephy_password_manager_get_type):
* embed/ephy-permission-manager.c: (ephy_permission_info_get_type),
(ephy_permission_manager_get_type):
* embed/find-dialog.c: (find_dialog_get_type):
* embed/mozilla/mozilla-download.cpp:
* embed/mozilla/mozilla-embed-event.cpp:
* embed/mozilla/mozilla-embed-persist.cpp:
* embed/mozilla/mozilla-embed-single.cpp:
* embed/mozilla/mozilla-embed.cpp:
* lib/egg/egg-editable-toolbar.c: (egg_editable_toolbar_get_type):
* lib/egg/egg-toolbar-editor.c: (egg_toolbar_editor_get_type):
* lib/egg/egg-toolbars-model.c: (egg_toolbars_model_get_type):
* lib/ephy-dialog.c: (ephy_dialog_get_type):
* lib/ephy-file-chooser.c: (ephy_file_chooser_get_type):
* lib/ephy-loader.c: (ephy_loader_get_type):
* lib/ephy-module.c: (ephy_module_get_type):
* lib/ephy-node-db.c: (ephy_node_db_get_type):
* lib/ephy-node-filter.c: (ephy_node_filter_get_type):
* lib/ephy-shlib-loader.c: (ephy_shlib_loader_get_type):
* lib/widgets/ephy-location-entry.c:
(ephy_location_entry_get_type):
* lib/widgets/ephy-node-view.c: (ephy_node_view_get_type):
* lib/widgets/ephy-search-entry.c: (ephy_search_entry_get_type):
* lib/widgets/ephy-spinner.c: (ephy_spinner_cache_get_type),
(ephy_spinner_get_type):
* lib/widgets/ephy-tree-model-node.c:
(ephy_tree_model_node_get_type):
* lib/widgets/ephy-tree-model-sort.c:
(ephy_tree_model_sort_get_type):
* lib/widgets/ephy-zoom-action.c: (ephy_zoom_action_get_type):
* lib/widgets/ephy-zoom-control.c: (ephy_zoom_control_get_type):
* src/bookmarks/ephy-bookmark-action.c:
(ephy_bookmark_action_get_type):
* src/bookmarks/ephy-bookmark-properties.c:
(ephy_bookmark_properties_get_type):
* src/bookmarks/ephy-bookmarks-editor.c:
(ephy_bookmarks_editor_get_type):
* src/bookmarks/ephy-bookmarks-menu.c:
(ephy_bookmarks_menu_get_type):
* src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_get_type):
* src/bookmarks/ephy-bookmarksbar-model.c:
(ephy_bookmarksbar_model_get_type):
* src/bookmarks/ephy-bookmarksbar.c: (ephy_bookmarksbar_get_type):
* src/bookmarks/ephy-favorites-menu.c:
(ephy_favorites_menu_get_type):
* src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_get_type):
* src/bookmarks/ephy-topic-action.c: (ephy_topic_action_get_type):
* src/bookmarks/ephy-topics-selector.c:
(ephy_topics_selector_get_type):
* src/ephy-completion-model.c: (ephy_completion_model_get_type):
* src/ephy-encoding-dialog.c: (ephy_encoding_dialog_get_type):
* src/ephy-encoding-menu.c: (ephy_encoding_menu_get_type):
* src/ephy-extension.c: (ephy_extension_get_type):
* src/ephy-extensions-manager.c:
(ephy_extensions_manager_get_type):
* src/ephy-favicon-action.c: (ephy_favicon_action_get_type):
* src/ephy-go-action.c: (ephy_go_action_get_type):
* src/ephy-history-window.c: (ephy_history_window_get_type):
* src/ephy-location-action.c: (ephy_location_action_get_type):
* src/ephy-navigation-action.c: (ephy_navigation_action_get_type):
* src/ephy-notebook.c: (ephy_notebook_get_type):
* src/ephy-session.c: (ephy_session_get_type):
* src/ephy-shell.c: (ephy_shell_get_type):
* src/ephy-statusbar.c: (ephy_statusbar_get_type):
* src/ephy-tab.c: (ephy_tab_get_type):
* src/ephy-tabs-menu.c: (ephy_tabs_menu_get_type):
* src/ephy-toolbars-model.c: (ephy_toolbars_model_get_type):
* src/ephy-window.c: (ephy_window_get_type):
* src/pdm-dialog.c: (pdm_dialog_get_type):
* src/ppview-toolbar.c: (ppview_toolbar_get_type):
* src/prefs-dialog.c: (prefs_dialog_get_type):
* src/toolbar.c: (toolbar_get_type):
Annotate "if (type == 0)" in get_type functions with G_UNLIKELY,
like the G_TYPE_DEFINE macros do.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/egg/egg-editable-toolbar.c | 12 | ||||
-rwxr-xr-x | lib/egg/egg-toolbar-editor.c | 12 | ||||
-rwxr-xr-x | lib/egg/egg-toolbars-model.c | 2 | ||||
-rw-r--r-- | lib/ephy-dialog.c | 2 | ||||
-rw-r--r-- | lib/ephy-file-chooser.c | 2 | ||||
-rw-r--r-- | lib/ephy-loader.c | 2 | ||||
-rw-r--r-- | lib/ephy-module.c | 2 | ||||
-rw-r--r-- | lib/ephy-node-db.c | 16 | ||||
-rw-r--r-- | lib/ephy-node-filter.c | 12 | ||||
-rw-r--r-- | lib/ephy-shlib-loader.c | 2 | ||||
-rw-r--r-- | lib/widgets/ephy-location-entry.c | 12 | ||||
-rw-r--r-- | lib/widgets/ephy-node-view.c | 12 | ||||
-rw-r--r-- | lib/widgets/ephy-search-entry.c | 12 | ||||
-rw-r--r-- | lib/widgets/ephy-spinner.c | 4 | ||||
-rw-r--r-- | lib/widgets/ephy-tree-model-node.c | 14 | ||||
-rw-r--r-- | lib/widgets/ephy-tree-model-sort.c | 14 | ||||
-rw-r--r-- | lib/widgets/ephy-zoom-action.c | 2 | ||||
-rw-r--r-- | lib/widgets/ephy-zoom-control.c | 2 |
18 files changed, 69 insertions, 67 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c index 02791ee86..0e7bc7d5e 100755 --- a/lib/egg/egg-editable-toolbar.c +++ b/lib/egg/egg-editable-toolbar.c @@ -90,9 +90,9 @@ struct EggEditableToolbarPrivate GType egg_editable_toolbar_get_type (void) { - static GType egg_editable_toolbar_type = 0; + static GType type = 0; - if (egg_editable_toolbar_type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { sizeof (EggEditableToolbarClass), @@ -106,12 +106,12 @@ egg_editable_toolbar_get_type (void) (GInstanceInitFunc) egg_editable_toolbar_init }; - egg_editable_toolbar_type = g_type_register_static (GTK_TYPE_VBOX, - "EggEditableToolbar", - &our_info, 0); + type = g_type_register_static (GTK_TYPE_VBOX, + "EggEditableToolbar", + &our_info, 0); } - return egg_editable_toolbar_type; + return type; } static int diff --git a/lib/egg/egg-toolbar-editor.c b/lib/egg/egg-toolbar-editor.c index f3ba1e94d..0187188ff 100755 --- a/lib/egg/egg-toolbar-editor.c +++ b/lib/egg/egg-toolbar-editor.c @@ -75,9 +75,9 @@ struct EggToolbarEditorPrivate GType egg_toolbar_editor_get_type (void) { - static GType egg_toolbar_editor_type = 0; + static GType type = 0; - if (egg_toolbar_editor_type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { sizeof (EggToolbarEditorClass), @@ -91,12 +91,12 @@ egg_toolbar_editor_get_type (void) (GInstanceInitFunc) egg_toolbar_editor_init }; - egg_toolbar_editor_type = g_type_register_static (GTK_TYPE_VBOX, - "EggToolbarEditor", - &our_info, 0); + type = g_type_register_static (GTK_TYPE_VBOX, + "EggToolbarEditor", + &our_info, 0); } - return egg_toolbar_editor_type; + return type; } static gint diff --git a/lib/egg/egg-toolbars-model.c b/lib/egg/egg-toolbars-model.c index 8da9908cd..0d91878e7 100755 --- a/lib/egg/egg-toolbars-model.c +++ b/lib/egg/egg-toolbars-model.c @@ -77,7 +77,7 @@ egg_toolbars_model_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { sizeof (EggToolbarsModelClass), diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c index 234680c4b..60136c082 100644 --- a/lib/ephy-dialog.c +++ b/lib/ephy-dialog.c @@ -112,7 +112,7 @@ ephy_dialog_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c index 156937509..fc0fcf7fa 100644 --- a/lib/ephy-file-chooser.c +++ b/lib/ephy-file-chooser.c @@ -56,7 +56,7 @@ ephy_file_chooser_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { diff --git a/lib/ephy-loader.c b/lib/ephy-loader.c index cbd19fce9..d4b1a0375 100644 --- a/lib/ephy-loader.c +++ b/lib/ephy-loader.c @@ -30,7 +30,7 @@ ephy_loader_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { diff --git a/lib/ephy-module.c b/lib/ephy-module.c index 60c96f1f2..95f9a587e 100644 --- a/lib/ephy-module.c +++ b/lib/ephy-module.c @@ -58,7 +58,7 @@ ephy_module_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo type_info = { diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c index 0eaf92755..27e27073b 100644 --- a/lib/ephy-node-db.c +++ b/lib/ephy-node-db.c @@ -67,10 +67,12 @@ static GObjectClass *parent_class = NULL; GType ephy_node_db_get_type (void) { - static GType ephy_node_db_type = 0; + static GType type = 0; - if (ephy_node_db_type == 0) { - static const GTypeInfo our_info = { + if (G_UNLIKELY (type == 0)) + { + static const GTypeInfo our_info = + { sizeof (EphyNodeDbClass), NULL, NULL, @@ -82,12 +84,12 @@ ephy_node_db_get_type (void) (GInstanceInitFunc) ephy_node_db_init }; - ephy_node_db_type = g_type_register_static (G_TYPE_OBJECT, - "EphyNodeDb", - &our_info, 0); + type = g_type_register_static (G_TYPE_OBJECT, + "EphyNodeDb", + &our_info, 0); } - return ephy_node_db_type; + return type; } static void diff --git a/lib/ephy-node-filter.c b/lib/ephy-node-filter.c index 229f99ad7..fd270b636 100644 --- a/lib/ephy-node-filter.c +++ b/lib/ephy-node-filter.c @@ -81,9 +81,9 @@ static guint ephy_node_filter_signals[LAST_SIGNAL] = { 0 }; GType ephy_node_filter_get_type (void) { - static GType ephy_node_filter_type = 0; + static GType type = 0; - if (ephy_node_filter_type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { @@ -98,12 +98,12 @@ ephy_node_filter_get_type (void) (GInstanceInitFunc) ephy_node_filter_init }; - ephy_node_filter_type = g_type_register_static (G_TYPE_OBJECT, - "EphyNodeFilter", - &our_info, 0); + type = g_type_register_static (G_TYPE_OBJECT, + "EphyNodeFilter", + &our_info, 0); } - return ephy_node_filter_type; + return type; } static void diff --git a/lib/ephy-shlib-loader.c b/lib/ephy-shlib-loader.c index 68276bb67..8c6db15b0 100644 --- a/lib/ephy-shlib-loader.c +++ b/lib/ephy-shlib-loader.c @@ -58,7 +58,7 @@ ephy_shlib_loader_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 08d591bf7..2ff40840d 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -93,9 +93,9 @@ enum GType ephy_location_entry_get_type (void) { - static GType ephy_location_entry_type = 0; + static GType type = 0; - if (ephy_location_entry_type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { @@ -110,12 +110,12 @@ ephy_location_entry_get_type (void) (GInstanceInitFunc) ephy_location_entry_init }; - ephy_location_entry_type = g_type_register_static (GTK_TYPE_TOOL_ITEM, - "EphyLocationEntry", - &our_info, 0); + type = g_type_register_static (GTK_TYPE_TOOL_ITEM, + "EphyLocationEntry", + &our_info, 0); } - return ephy_location_entry_type; + return type; } static gboolean diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c index e71b648b0..a67709e9b 100644 --- a/lib/widgets/ephy-node-view.c +++ b/lib/widgets/ephy-node-view.c @@ -111,9 +111,9 @@ static guint ephy_node_view_signals[LAST_SIGNAL] = { 0 }; GType ephy_node_view_get_type (void) { - static GType ephy_node_view_type = 0; + static GType type = 0; - if (ephy_node_view_type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { @@ -128,12 +128,12 @@ ephy_node_view_get_type (void) (GInstanceInitFunc) ephy_node_view_init }; - ephy_node_view_type = g_type_register_static (GTK_TYPE_TREE_VIEW, - "EphyNodeView", - &our_info, 0); + type = g_type_register_static (GTK_TYPE_TREE_VIEW, + "EphyNodeView", + &our_info, 0); } - return ephy_node_view_type; + return type; } static void diff --git a/lib/widgets/ephy-search-entry.c b/lib/widgets/ephy-search-entry.c index 2d0318774..bb84a323c 100644 --- a/lib/widgets/ephy-search-entry.c +++ b/lib/widgets/ephy-search-entry.c @@ -53,9 +53,9 @@ static guint ephy_search_entry_signals[LAST_SIGNAL] = { 0 }; GType ephy_search_entry_get_type (void) { - static GType ephy_search_entry_type = 0; + static GType type = 0; - if (ephy_search_entry_type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { @@ -70,12 +70,12 @@ ephy_search_entry_get_type (void) (GInstanceInitFunc) ephy_search_entry_init }; - ephy_search_entry_type = g_type_register_static (GTK_TYPE_ENTRY, - "EphySearchEntry", - &our_info, 0); + type = g_type_register_static (GTK_TYPE_ENTRY, + "EphySearchEntry", + &our_info, 0); } - return ephy_search_entry_type; + return type; } static void diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c index d2b09bd37..ab98dc4cb 100644 --- a/lib/widgets/ephy-spinner.c +++ b/lib/widgets/ephy-spinner.c @@ -95,7 +95,7 @@ ephy_spinner_cache_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { @@ -474,7 +474,7 @@ ephy_spinner_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { diff --git a/lib/widgets/ephy-tree-model-node.c b/lib/widgets/ephy-tree-model-node.c index 62377c664..60355eaf7 100644 --- a/lib/widgets/ephy-tree-model-node.c +++ b/lib/widgets/ephy-tree-model-node.c @@ -67,9 +67,9 @@ static GObjectClass *parent_class = NULL; GType ephy_tree_model_node_get_type (void) { - static GType ephy_tree_model_node_type = 0; + static GType type = 0; - if (ephy_tree_model_node_type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { @@ -91,16 +91,16 @@ ephy_tree_model_node_get_type (void) NULL }; - ephy_tree_model_node_type = g_type_register_static (G_TYPE_OBJECT, - "EphyTreeModelNode", - &our_info, 0); + type = g_type_register_static (G_TYPE_OBJECT, + "EphyTreeModelNode", + &our_info, 0); - g_type_add_interface_static (ephy_tree_model_node_type, + g_type_add_interface_static (type, GTK_TYPE_TREE_MODEL, &tree_model_info); } - return ephy_tree_model_node_type; + return type; } static void diff --git a/lib/widgets/ephy-tree-model-sort.c b/lib/widgets/ephy-tree-model-sort.c index 6803be38e..df5f9533c 100644 --- a/lib/widgets/ephy-tree-model-sort.c +++ b/lib/widgets/ephy-tree-model-sort.c @@ -58,9 +58,9 @@ static GObjectClass *parent_class = NULL; GType ephy_tree_model_sort_get_type (void) { - static GType ephy_tree_model_sort_type = 0; + static GType type = 0; - if (ephy_tree_model_sort_type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { @@ -81,16 +81,16 @@ ephy_tree_model_sort_get_type (void) NULL }; - ephy_tree_model_sort_type = g_type_register_static (GTK_TYPE_TREE_MODEL_SORT, - "EphyTreeModelSort", - &our_info, 0); + type = g_type_register_static (GTK_TYPE_TREE_MODEL_SORT, + "EphyTreeModelSort", + &our_info, 0); - g_type_add_interface_static (ephy_tree_model_sort_type, + g_type_add_interface_static (type, EGG_TYPE_TREE_MULTI_DRAG_SOURCE, &multi_drag_source_info); } - return ephy_tree_model_sort_type; + return type; } static void diff --git a/lib/widgets/ephy-zoom-action.c b/lib/widgets/ephy-zoom-action.c index 5a55f60b0..fcda19f2f 100644 --- a/lib/widgets/ephy-zoom-action.c +++ b/lib/widgets/ephy-zoom-action.c @@ -66,7 +66,7 @@ ephy_zoom_action_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { diff --git a/lib/widgets/ephy-zoom-control.c b/lib/widgets/ephy-zoom-control.c index c9c3bfaff..15d7bcda3 100644 --- a/lib/widgets/ephy-zoom-control.c +++ b/lib/widgets/ephy-zoom-control.c @@ -65,7 +65,7 @@ ephy_zoom_control_get_type (void) { static GType type = 0; - if (type == 0) + if (G_UNLIKELY (type == 0)) { static const GTypeInfo our_info = { |