[libdvdcss-devel] [PATCH 1/4] Replace DVD access method #defines by an enum.

Fabian Greffrath fabian at greffrath.com
Mon Nov 3 10:05:23 CET 2014


Am Montag, den 03.11.2014, 09:53 +0100 schrieb Diego Biurrun: 
> On Mon, Nov 03, 2014 at 09:50:06AM +0100, Fabian Greffrath wrote:
> > Am Samstag, den 01.11.2014, 17:56 +0100 schrieb Diego Biurrun: 
> > > +enum dvdcss_method {
> > > +    DVDCSS_METHOD_KEY,
> > > +    DVDCSS_METHOD_DISC,
> > > +    DVDCSS_METHOD_TITLE,
> > > +};
> > [...] 
> > > +    enum dvdcss_method i_method;
> > 
> > Why don't you use typedef enum?
> 
> I'll turn this around - why should I typedef?

Because then you could declare the variable without having to duplicate
its enum type:

typedef enum dvdcss_method {
...
} dvdcss_method_t;
[...]
dvdcss_method_t i_method;

- Fabian



More information about the libdvdcss-devel mailing list