freetype
[Top][All Lists]
Advanced

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

Re: Uninitalized Face data


From: Antoine Leca
Subject: Re: Uninitalized Face data
Date: Thu, 24 Feb 2000 17:37:52 +0100

Bertrand Petit wrote:
> 
> > > struct TT_Instance_ { void*  z; };
> > > typedef struct TT_Instance_  TT_Instance;
>
>         This schema would be easier to understand if struct
> TT_Instance_ was called _TT_Instance. The location of the underscore
> is important as it's semantic is documented: underscored symbols and
> type names are private and shall never be directly referenced by
> library users (K&R, ANSI C).

Under ANSI C, _TT_Instance is reserved to the implementation, i.e. the
C compiler; and FreeType is *not* part of the C compiler.
So it is a violation of the namespace rules to use such a name.


By the way, I do not exacty see *why*

  /* Do not rely on the exact content of this structure, as it may vary. */
  struct TT_Instance_ { void*  z; };
  typedef struct TT_Instance_  TT_Instance;

is harder to understand than

  /* Do not rely on the exact content of this structure, as it may vary. */
  struct _TT_Instance { void*  z; };
  typedef struct _TT_Instance  TT_Instance;

They look like almost the same to me. (In other words, nobody is going to use
TT_Instance_, under any circonstance.)


Antoine



reply via email to

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