summaryrefslogtreecommitdiff
path: root/stackstash.c
diff options
context:
space:
mode:
authorSoeren Sandmann <sandmann@redhat.com>2005-11-06 23:27:17 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2005-11-06 23:27:17 +0000
commit64b2627c4a69db9ad4f0bc170b08a6bc66412b44 (patch)
treeb2fa9bcb46e4f5012c605009c6108cc5d36f49be /stackstash.c
parentc1bfbbf9b8058f20a97905b750da5c52101e2488 (diff)
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.
Diffstat (limited to 'stackstash.c')
-rw-r--r--stackstash.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/stackstash.c b/stackstash.c
index 1a4c7d3..3a285bc 100644
--- a/stackstash.c
+++ b/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);