On Sat, May 5, 2018 at 11:10 AM, Werner LEMBERG <w...@gnu.org> wrote:
> > >> It is common for object-disposal routines to never return error > >> statuses. The archetypal example is free(3) > >> <https://linux.die.net/man/3/free>. If this is passed a valid > >> pointer, it disposes of the object; if it is passed NULL, it > >> quietly returns without doing anything. If it is passed an invalid > >> pointer, then this indicates a program bug, so there is no point > >> returning an error code anyway: better to report an error message > >> to stderr and even abort the program. > > I agree with Gregor: A library should not call `exit' by itself. > REALLY wish someone could convince libpng of that. > > >> [...] Otherwise, if it is passed NULL, it should just quietly > >> return without doing anything. This makes it easier to write code > >> that initializes all temporary pointers up front and > >> unconditionally disposes them at the end; there is no need to > >> tediously check everything for NULL pointers, because the disposal > >> routines will take care of that. > > It's not clear to me how such a situation can arise with FreeType. > Please give an example. > > > Werner > > _______________________________________________ > Freetype mailing list > Freetype@nongnu.org > https://lists.nongnu.org/mailman/listinfo/freetype > _______________________________________________ Freetype mailing list Freetype@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype