freetype
[Top][All Lists]
Advanced

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

Re: [ft] FT_Done_Face Should Not Return An Error


From: Werner LEMBERG
Subject: Re: [ft] FT_Done_Face Should Not Return An Error
Date: Mon, 07 May 2018 08:18:35 +0200 (CEST)

>> You would only check the return value of `FT_Done_Face' if your
>> code gets an `FT_Face' handle that it doesn't manage by itself
>> (rather unlikely, but who knows).  In this situation it could
>> happen that the handle is NULL, and this should be reported back –
>> not because `FT_Done_Face' can't handle value NULL but the fact
>> that it has received such a handle, which indicates a problem in
>> the calling program.
> 
> NULL should be perfectly valid -- it simply indicates the object was
> never allocated.

Well, yes – if you trust the source.  As mentioned, this is a
hyphothetical example.

Anyway, I won't change FreeType's behaviour.  It will continue to
return an error code if `NULL' is passed as an `FT_Face' object, and
you are free to completely ignore the return value :-)

Maybe the documentation can be improved; I'm open to all suggestions.


   Werner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]