}
static void
-iter_stack_push (IterStack *stack, const GtkTextIter *iter)
+iter_stack_push (IterStack *stack,
+ const GtkTextIter *iter)
{
stack->count += 1;
if (stack->count > stack->alloced)
{
stack->alloced = stack->count*2;
stack->iters = g_realloc (stack->iters,
- stack->alloced*sizeof (GtkTextIter));
+ stack->alloced * sizeof (GtkTextIter));
}
stack->iters[stack->count-1] = *iter;
}
static gboolean
-iter_stack_pop (IterStack *stack, GtkTextIter *iter)
+iter_stack_pop (IterStack *stack,
+ GtkTextIter *iter)
{
if (stack->count == 0)
return FALSE;
static void
summary_list_destroy (Summary *summary)
{
- Summary *next;
- while (summary != NULL)
- {
- next = summary->next;
- summary_destroy (summary);
- summary = next;
- }
+ g_slice_free_chain (Summary, summary, next);
}
static GtkTextLine*
summary->info = (void*)0x1;
summary->toggle_count = 567;
summary->next = (void*)0x1;
- g_free (summary);
+ g_slice_free (Summary, summary);
}
static GtkTextBTreeNode*
{
/* didn't find a summary for our tag. */
g_return_if_fail (adjust > 0);
- summary = g_new (Summary, 1);
+ summary = g_slice_new (Summary);
summary->info = info;
summary->toggle_count = adjust;
summary->next = node->summary;
*/
GtkTextBTreeNode *rootnode = info->tag_root;
- summary = (Summary *) g_malloc (sizeof (Summary));
+ summary = g_slice_new (Summary);
summary->info = info;
summary->toggle_count = info->toggle_count - delta;
summary->next = rootnode->summary;
rootLevel = rootnode->level;
info->tag_root = rootnode;
}
- summary = (Summary *) g_malloc (sizeof (Summary));
+ summary = g_slice_new (Summary);
summary->info = info;
summary->toggle_count = delta;
summary->next = node->summary;