Use stack_node_new() o (profile_load): Use set_root() instead of

2006-11-19  Soren Sandmann <sandmann@redhat.com>

        * profile.c (profile_load): Use stack_node_new() o
        (profile_load): Use set_root() instead of new_from_root();

        * stackstash.c (stack_stash_new_from_root): Delete this function
        (stack_stash_set_root): Add this function
        (stack_node_new): Export this function
This commit is contained in:
Soren Sandmann
2006-11-20 04:08:01 +00:00
committed by Søren Sandmann Pedersen
parent 9af533a11f
commit 0b718ee95c
4 changed files with 23 additions and 14 deletions

View File

@ -199,11 +199,13 @@ profile_load (const char *filename, GError **err)
sfile_end_get (input, "object", string);
}
sfile_end_get (input, "objects", NULL);
profile->stash = stack_stash_new ((GDestroyNotify)g_free);
n = sfile_begin_get_list (input, "nodes");
for (i = 0; i < n; ++i)
{
StackNode *node = g_new (StackNode, 1);
StackNode *node = stack_node_new ();
sfile_begin_get_record (input, "node");
@ -225,7 +227,7 @@ profile_load (const char *filename, GError **err)
sformat_free (format);
sfile_input_free (input);
profile->stash = stack_stash_new_from_root (root, (GDestroyNotify)g_free);
stack_stash_set_root (profile->stash, root);
return profile;
}