Make these function call back with GLists rather than GSLists.

Sun Nov  6 18:31:23 2005  Soeren Sandmann  <sandmann@redhat.com>

        * stackstash.c (stack_stash_foreach):
        * stackstash.c (stack_node_foreach_trace): Make these function
        call back with GLists rather than GSLists.

        * profile.c (add_trace_to_tree): Iterate backwards instead of
        copying the list.
This commit is contained in:
Soeren Sandmann
2005-11-06 23:27:17 +00:00
committed by Søren Sandmann Pedersen
parent c1bfbbf9b8
commit 64b2627c4a
5 changed files with 27 additions and 17 deletions

View File

@ -234,17 +234,15 @@ profile_new (StackStash *stash)
}
static void
add_trace_to_tree (GSList *trace, gint size, gpointer data)
add_trace_to_tree (GList *trace, gint size, gpointer data)
{
GSList *list;
GList *list;
GPtrArray *nodes_to_unmark = g_ptr_array_new ();
ProfileDescendant *parent = NULL;
int i, len;
ProfileDescendant **tree = data;
trace = g_slist_reverse (g_slist_copy (trace));
for (list = trace; list != NULL; list = list->next)
for (list = g_list_last (trace); list != NULL; list = list->prev)
{
gpointer address = list->data;
ProfileDescendant *match = NULL;
@ -321,7 +319,6 @@ add_trace_to_tree (GSList *trace, gint size, gpointer data)
}
g_ptr_array_free (nodes_to_unmark, TRUE);
g_slist_free (trace);
}
ProfileDescendant *