mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
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:
committed by
Søren Sandmann Pedersen
parent
c1bfbbf9b8
commit
64b2627c4a
12
stackstash.c
12
stackstash.c
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user