Re: Proposal for new functions in glib




On 31-Jul-98 Tim Janik wrote:


I forgot to mention :

> void   g_node_insert    (GNode *parent,
>                          GNode *prev_sibling /* may be NULL */,
>                          GNode *node);

g_node_insert (parent, NULL, node); means 'prepend to children list' ?
Then it's a little bit tricky to 'append to children list'.

I think this api should be changed to :

void   g_node_insert    (GNode *parent,
                         GNode *next_sibling /* may be NULL */,
                         GNode *node);

here we have 'prepend to children list' :
g_node_insert (parent, parent->children, node);

'append to children list':
g_node_insert (parent, NULL, node);

bye,
  Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]