unnecessary assertions in g_strsplit and g_strjoinv



g_strsplit and g_strjoinv now contain assertions that the string to split or strings to join are non-NULL.

It's not clear to me that this is necessary; surely glib should check for NULL, but the semantics
of splitting a NULL string needn't be ambiguous.   As it stands now, glib does the assertion 
checks, but requiring the client to do so means that all clients must test 'string' and
'str_array', before calling g_strsplit and strjoinv, respectively.

Removing the assertions would reduce code size since all the glib string routine clients in the 
desktop could omit the checks (as some already do :-P ).  

I think this makes sense - note also that the requirement for the args of g_strsplit and g_strjoinv to
be non-NULL is not documented.

- Bill



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