[linux-dvb] [PATCH] Multi protocol support
Johannes Stezenbach
js at linuxtv.org
Sun Apr 16 12:07:59 CEST 2006
On Sat, Apr 15, 2006, Manu Abraham wrote:
> Andreas Oberritter wrote:
> >Manu Abraham wrote:
> >>+typedef enum {
> >>+ FE_TRANSPORT,
> >>+ FE_GENERIC_PACKET,
> >>+ FE_GENERIC_CONTINUOUS,
> >>+ FE_RESERVED
> >>+} fe_bbheader_t;
> >
> >See dmx_bbheader_t.
> >
> >IIRC it was discouraged to introduce new typedefs.
>
> The idea of discouraging typedef's was for typedefining a struct IIRC
No, typedefs should only be used if you deliberately want to
_hide_ the true data type. Consider:
foo_t bar; // wtf is it?
vs.
enum foo bar; // it's an enum
That said, with all the legacy typedefs in the DVB API, the question
is whether consistency is more important than avoiding typdefs...
Johannes
More information about the linux-dvb
mailing list