Source-Changes-D archive

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

Re: CVS commit: src



On Tue, 12 Apr 2011, Mindaugas Rasiukevicius wrote:

> Klaus Klein <kleink%kleink.org@localhost> wrote:
> > > Log Message:
> > > Add a small summary parge for struct tm from <time.h>. Cf. timeval(3).
> >
> > This exhibits something particularly well that's been bugging me for
> > quite a while about such documentation changes: I think documenting
> > the implementation's structure layouts in section 3 is wrong, at least
> > when supposedly portable interfaces are concerned.  Those interested
> > in structure member poking will look at the header file anyway, and,
> > by being that specific, such documentation creates the obligation to
> > keep the redundant definition in sync.
>
> I agree with Klaus on this point.

I sometimes like to say that "struct xxx has at least the following
members" rather than "struct xxx is defined as", because it allows for
padding and flexibility when that may be needed..

iain


Home | Main Index | Thread Index | Old Index