Commit 0e53172e authored by Christian Persch's avatar Christian Persch Committed by Christian Persch

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.
parent 786d8d71
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.
2004-10-23 Christian Persch <chpe@cvs.gnome.org>
* lib/widgets/ephy-node-view.c: (drag_data_received_cb):
......
- Check that filtering is not done more than one time on bookmarks dialogs init
- Annotate "if (type == 0)" in *_get_type() with G_UNLIKELY
Stuff to port to new glib/gtk+ APIs:
- port egg-toolbar-editor to GtkIconView as soon as it supports DND (bug #150270)
- port to GOption
- port to new gtk+ uri-list DND APIs
- port Downloads directory button in prefs to GtkFileChooserButton
(but wait for bugs #154388, #154390, #154392, #154394)
......@@ -129,9 +129,9 @@ static GObjectClass *parent_class = NULL;
GType
downloader_view_get_type (void)
{
static GType downloader_view_type = 0;
static GType type = 0;
if (downloader_view_type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......@@ -146,12 +146,12 @@ downloader_view_get_type (void)
(GInstanceInitFunc) downloader_view_init
};
downloader_view_type = g_type_register_static (EPHY_TYPE_DIALOG,
"DownloaderView",
&our_info, 0);
type = g_type_register_static (EPHY_TYPE_DIALOG,
"DownloaderView",
&our_info, 0);
}
return downloader_view_type;
return type;
}
static void
......
......@@ -32,7 +32,7 @@ ephy_command_manager_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -30,7 +30,7 @@ ephy_cookie_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
type = g_boxed_type_register_static ("EphyCookie",
(GBoxedCopyFunc) ephy_cookie_copy,
......@@ -105,7 +105,7 @@ ephy_cookie_manager_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -54,9 +54,9 @@ static guint ephy_download_signals[LAST_SIGNAL] = { 0 };
GType
ephy_download_get_type (void)
{
static GType ephy_download_type = 0;
static GType type = 0;
if (ephy_download_type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......@@ -71,12 +71,12 @@ ephy_download_get_type (void)
(GInstanceInitFunc) ephy_download_init
};
ephy_download_type = g_type_register_static (G_TYPE_OBJECT,
"EphyDownload",
&our_info, 0);
type = g_type_register_static (G_TYPE_OBJECT,
"EphyDownload",
&our_info, 0);
}
return ephy_download_type;
return type;
}
static void
......
......@@ -59,9 +59,9 @@ static GObjectClass *parent_class = NULL;
GType
ephy_embed_dialog_get_type (void)
{
static GType ephy_embed_dialog_type = 0;
static GType type = 0;
if (ephy_embed_dialog_type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......@@ -76,12 +76,12 @@ ephy_embed_dialog_get_type (void)
(GInstanceInitFunc) ephy_embed_dialog_init
};
ephy_embed_dialog_type = g_type_register_static (EPHY_TYPE_DIALOG,
"EphyEmbedDialog",
&our_info, 0);
type = g_type_register_static (EPHY_TYPE_DIALOG,
"EphyEmbedDialog",
&our_info, 0);
}
return ephy_embed_dialog_type;
return type;
}
static void
......
......@@ -34,7 +34,7 @@ ephy_embed_event_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -65,7 +65,7 @@ ephy_embed_persist_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -61,7 +61,7 @@ ephy_embed_shell_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -32,7 +32,7 @@ ephy_embed_single_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -55,9 +55,9 @@ ephy_embed_chrome_get_type (void)
GType
ephy_embed_get_type (void)
{
static GType ephy_embed_type = 0;
static GType type = 0;
if (ephy_embed_type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......@@ -66,13 +66,12 @@ ephy_embed_get_type (void)
NULL,
};
ephy_embed_type = g_type_register_static (G_TYPE_INTERFACE,
"EphyEmbed",
&our_info,
(GTypeFlags)0);
type = g_type_register_static (G_TYPE_INTERFACE,
"EphyEmbed",
&our_info, (GTypeFlags)0);
}
return ephy_embed_type;
return type;
}
static void
......
......@@ -174,9 +174,9 @@ static GObjectClass *parent_class = NULL;
GType
ephy_encodings_get_type (void)
{
static GType ephy_encodings_type = 0;
static GType type = 0;
if (ephy_encodings_type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......@@ -191,12 +191,12 @@ ephy_encodings_get_type (void)
(GInstanceInitFunc) ephy_encodings_init
};
ephy_encodings_type = g_type_register_static (G_TYPE_OBJECT,
"EphyEncodings",
&our_info, 0);
type = g_type_register_static (G_TYPE_OBJECT,
"EphyEncodings",
&our_info, 0);
}
return ephy_encodings_type;
return type;
}
static void
......
......@@ -82,7 +82,7 @@ ephy_favicon_cache_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -88,7 +88,7 @@ ephy_history_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -34,7 +34,7 @@ ephy_password_info_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
type = g_boxed_type_register_static ("EphyPasswordInfo",
(GBoxedCopyFunc) ephy_password_info_copy,
......@@ -113,7 +113,7 @@ ephy_password_manager_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -34,7 +34,7 @@ ephy_permission_info_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
type = g_boxed_type_register_static ("EphyPermissionInfo",
(GBoxedCopyFunc) ephy_permission_info_copy,
......@@ -109,7 +109,7 @@ ephy_permission_manager_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -82,9 +82,9 @@ EphyDialogProperty properties [] =
GType
find_dialog_get_type (void)
{
static GType find_dialog_type = 0;
static GType type = 0;
if (find_dialog_type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......@@ -99,12 +99,12 @@ find_dialog_get_type (void)
(GInstanceInitFunc) find_dialog_init
};
find_dialog_type = g_type_register_static (EPHY_TYPE_EMBED_DIALOG,
"FindDialog",
&our_info, 0);
type = g_type_register_static (EPHY_TYPE_EMBED_DIALOG,
"FindDialog",
&our_info, 0);
}
return find_dialog_type;
return type;
}
......
......@@ -31,12 +31,9 @@
#include <nsEmbedString.h>
#include <nsMemory.h>
static void
mozilla_download_class_init (MozillaDownloadClass *klass);
static void
mozilla_download_init (MozillaDownload *ges);
static void
mozilla_download_finalize (GObject *object);
static void mozilla_download_class_init (MozillaDownloadClass *klass);
static void mozilla_download_init (MozillaDownload *ges);
static void mozilla_download_finalize (GObject *object);
enum
{
......@@ -56,9 +53,9 @@ static GObjectClass *parent_class = NULL;
GType
mozilla_download_get_type (void)
{
static GType mozilla_download_type = 0;
static GType type = 0;
if (mozilla_download_type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......@@ -73,13 +70,12 @@ mozilla_download_get_type (void)
(GInstanceInitFunc) mozilla_download_init
};
mozilla_download_type =
g_type_register_static (EPHY_TYPE_DOWNLOAD,
"MozillaDownload",
&our_info, (GTypeFlags)0);
type = g_type_register_static (EPHY_TYPE_DOWNLOAD,
"MozillaDownload",
&our_info, (GTypeFlags)0);
}
return mozilla_download_type;
return type;
}
static char *
......
......@@ -54,7 +54,7 @@ mozilla_embed_event_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -62,9 +62,9 @@ static GObjectClass *parent_class = NULL;
GType
mozilla_embed_persist_get_type (void)
{
static GType mozilla_embed_persist_type = 0;
static GType type = 0;
if (mozilla_embed_persist_type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......@@ -79,13 +79,12 @@ mozilla_embed_persist_get_type (void)
(GInstanceInitFunc) mozilla_embed_persist_init
};
mozilla_embed_persist_type =
g_type_register_static (EPHY_TYPE_EMBED_PERSIST,
"MozillaEmbedPersist",
&our_info, (GTypeFlags)0);
type = g_type_register_static (EPHY_TYPE_EMBED_PERSIST,
"MozillaEmbedPersist",
&our_info, (GTypeFlags) 0);
}
return mozilla_embed_persist_type;
return type;
}
static void
......
......@@ -119,7 +119,7 @@ mozilla_embed_single_get_type (void)
{
static GType type = 0;
if (type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......
......@@ -128,9 +128,9 @@ ephy_command_manager_iface_init (EphyCommandManagerIface *iface)
GType
mozilla_embed_get_type (void)
{
static GType mozilla_embed_type = 0;
static GType type = 0;
if (mozilla_embed_type == 0)
if (G_UNLIKELY (type == 0))
{
static const GTypeInfo our_info =
{
......@@ -159,19 +159,19 @@ mozilla_embed_get_type (void)
NULL
};
mozilla_embed_type = g_type_register_static (GTK_TYPE_MOZ_EMBED,
"MozillaEmbed",
&our_info,
(GTypeFlags)0);
g_type_add_interface_static (mozilla_embed_type,
type = g_type_register_static (GTK_TYPE_MOZ_EMBED,
"MozillaEmbed",
&our_info,
(GTypeFlags)0);
g_type_add_interface_static (type,
EPHY_TYPE_EMBED,
&embed_info);
g_type_add_interface_static (mozilla_embed_type,
g_type_add_interface_static (type,
EPHY_TYPE_COMMAND_MANAGER,
&ephy_command_manager_info);
}
return mozilla_embed_type;
return type;
}
static gboolean
......
......@@ -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
......
......@@ -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
......
......@@ -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),
......
......@@ -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 =
{
......
......@@ -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 =
{
......
......@@ -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 =
{
......
......@@ -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 =
{
......
......@@ -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
......
......@@ -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
......
......@@ -58,7 +58,7 @@ ephy_shlib_loader_get_type (void)
{
static GType type = 0;