freetype
[Top][All Lists]
Advanced

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

Re: Uninitalized Face data


From: Pavel Kankovsky
Subject: Re: Uninitalized Face data
Date: Thu, 24 Feb 2000 12:21:53 +0100 (MET)

On Thu, 24 Feb 2000, Antoine Leca wrote:

> You are suposed to create the instances with something like:

It is often useful to be able to initialize the handle with an invalid
value and be able to detect that invalid value later. (In particular, this
makes destruction of partially constructed data structures during error
recovery much easier.)

In fact, I had to cheat in a similar way Arnar did when I wrote
ftstrpnm. I intended to point the problem out but, unfortunately,
I slipped out of my memory. :P

I think there should be a macro testing handle validity (xx_VALID(x)),
and a macro setting a handle to the invalid value (either x = xx_NULL or
xx_NULLIFY(x)). Moreover, it should be guaranteed that a zero-filled
handle is invalid (making statically allocated handles invalid and making
it possible to mass-initialize handles with memset()).

--Pavel Kankovsky aka Peak  [ Boycott Microsoft--http://www.vcnet.com/bms ]
"Resistance is futile. Open your source code and prepare for assimilation."




reply via email to

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