3 May
2009
3 May
'09
12:28 p.m.
I've noticed that a_Url_free() and a_Image_unref() both guard against being passed a NULL argument, yet in several cases the code that calls these functions also checks for a NULL, which is redundant. I think that if the API officially accepts NULL then code that calls the API shouldn't be checking for it. Conversely, if the API does not accept NULL then its implementation shouldn't be checking for it. So I would suggest we remove the redundancy by eliminating the NULL check from either the callers or the API implementation. Thoughts? I'll provide patches if people agree and decide whether or not these APIs should support NULL. Regards, Jeremy Henty