Hi,
On Fri, Apr 17, 2015 at 5:41 AM, Eric Sunshine <[email protected]> wrote:
> On Tue, Apr 14, 2015 at 1:28 PM, Paul Tan <[email protected]> wrote:
>> Below is the fixed patch. I also decided to return NULL if `filename` is
>> NULL because such an input usually indicated an uncaught error.
>
> Unfortunately, this blurs the line between programmer error (passing
> NULL for filename) and a user/configuration error (XDG_CONFIG_HOME and
> HOME being undefined). If there is indeed no valid interpretation for
> filename==NULL, then it may be better to die() or assert() here to
> flag the programmer error as early as possible, rather than returning
> NULL.
I'm inclined to agree, but off the top of my head an API user may wish to do:
xdg_config_home(function_which_returns_NULL_on_error())
And wish for the error to propagate, but that may be considered sloppy
programming and so it's better to treat a NULL input as a bug.
Will fix this by calling assert(). Thanks.
Regards,
Paul
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html