Possible problem in g_list_find




As currently written, g_list_find assumes that the value passed by the user as 
data is complete.  Reasonable assumption if you're not using GLists as a 
table, but if you are manipulating tables as GLists you need the ability to 
search on a key value.  This can be done by writing your own search function 
using the current interface, but a built-in function might be more useful.

Consider a function (tentatively called g_list_search) with a key comparison 
function as a parameter.  This could even traverse a GList, creating a new 
list that contains all items which match the key.

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]