Possible bug (feature?) in g_list_insert_sorted (glist.c)




Have been working on some tools using gtk+ & ran into a behavioural problem 
with GLists.  If you are adding data to a GList using g_list_insert_sorted you 
will get duplicate entries.  This appears (to me, anyhow) to be inappropriate 
behaviour.  I would expect g_list_insert to allow duplicates; you might need 
them.  A sorted list, on the other hand, should not insert duplicates.

Suggest that either g_list_insert_sorted be modified to reject duplicates ( 
cmp == 0), or that a g_list_insert_uniq_sorted be added.

Thoughts?

Best!
   rickf
-- 
Rick Forrister                 <Richard.Forrister@jpl.nasa.gov>

Opera: Greek word meaning "death by music".
		--Anonymous




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