summaryrefslogtreecommitdiff
path: root/gtk/ethclist.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-12-02 03:12:24 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-12-02 03:12:24 +0000
commite2e3b87c73b049fe55540c5c3729840fbf5064d2 (patch)
tree14c33d0ecd4033a9fd02c29d82f2f8500f6a32ee /gtk/ethclist.c
parent2e61f4d4c70cc721bf324484554f70b6a0cf3840 (diff)
downloadwireshark-e2e3b87c73b049fe55540c5c3729840fbf5064d2.tar.gz
performance enhancement:
in some profiling runs eth_clist_get_type() took ~6% change this to just a variable and initialize it explicitely from main.c svn path=/trunk/; revision=12653
Diffstat (limited to 'gtk/ethclist.c')
-rw-r--r--gtk/ethclist.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/gtk/ethclist.c b/gtk/ethclist.c
index 4226d46c89..f9018b1504 100644
--- a/gtk/ethclist.c
+++ b/gtk/ethclist.c
@@ -479,15 +479,13 @@ static guint clist_signals[LAST_SIGNAL] = {0};
static GtkTargetEntry clist_target_table = { "gtk-clist-drag-reorder", 0, 0};
-GtkType
-eth_clist_get_type (void)
-{
- static GtkType clist_type = 0;
+GtkType eth_clist_type = 0;
- if (!clist_type)
- {
- static const GtkTypeInfo clist_info =
- {
+void
+init_eth_clist_type (void)
+{
+ static const GtkTypeInfo clist_info =
+ {
"EthCList",
sizeof (EthCList),
sizeof (EthCListClass),
@@ -496,12 +494,9 @@ eth_clist_get_type (void)
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
- };
-
- clist_type = gtk_type_unique (GTK_TYPE_CONTAINER, &clist_info);
- }
+ };
- return clist_type;
+ eth_clist_type = gtk_type_unique (GTK_TYPE_CONTAINER, &clist_info);
}
static void