Re: GList strange behavior



On Thu, Aug 16, 2012 at 06:49:25PM +0400, Vlasov Vitaly wrote:
I need to save newly created list poiner.

No.

Many operations change the list head (by adding, removing, reordering,
..., elements).  In general, if an operation returns the new list head
you *must* save and use that in subsequent operations.

 So, i need to use g_list_last() to 
save it? Is there another method to save created list pointer?

*Every* operation that may change the list head returns the new list
head.  That's the pointer to use.

Yeti




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