Source-Changes archive

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

Re: CVS commit: src/sys/sys



On Tue, Dec 20, 2005 at 02:24:53PM +0900, YAMAMOTO Takashi wrote:
> > Module Name:        src
> > Committed By:       thorpej
> > Date:               Tue Dec 20 04:30:28 UTC 2005
> > 
> > Modified Files:
> >     src/sys/sys: device.h
> > 
> > Log Message:
> > Provide typedefs:
> > - devclass_t
> > - devact_t
> > - cfdata_t
> > - device_t
> > 
> > ...and use them.
> 
> there was a contrary movement, wasn't it?
> eg. vm_page_t -> struct vm_page *.
> 
> (i personally don't have preference to either of them.)

One subtle difference is that you can specify
    struct fred;
many times (eg in different heaader files), but that there can only be one
    typedef struct fred fred_t;
So using the latter in fuction prototypes may require the inclusion of
more baggage.

OTOH I'm for typedefs because they reduce the amount of typing.

        David

-- 
David Laight: david%l8s.co.uk@localhost



Home | Main Index | Thread Index | Old Index