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

@ -127,17 +127,20 @@ stack_stash_add_trace (StackStash *stash,
static void
do_callback (StackNode *node,
const GSList *trace,
GList *trace,
StackFunction func,
gpointer data)
{
GSList link;
GList link;
if (!node)
return;
link.next = (GSList *)trace;
if (trace)
trace->prev = &link;
link.next = trace;
link.data = node->address;
link.prev = NULL;
if (node->size)
func (&link, node->size, data);
@ -159,10 +162,11 @@ stack_node_foreach_trace (StackNode *node,
StackFunction func,
gpointer data)
{
GSList link;
GList link;
link.next = NULL;
link.data = node->address;
link.prev = NULL;
if (node->size)
func (&link, node->size, data);