[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: GDI+: headers and one test
From:       Chris Robinson <chris.kcat () gmail ! com>
Date:       2007-05-31 18:21:13
Message-ID: 200705311121.14289.chris.kcat () gmail ! com
[Download RAW message or body]

On Thursday 31 May 2007 06:59:09 am Francois Gouget wrote:
> --- /dev/null
> +++ b/include/GdiplusTypes.h
> [...]
> +typedef enum {
> [...]
> +} Status;
>
> Hmm, this is not the same as the PSDK. The PSDK only defines 'enum
> Status { ... }' which, in theory, should only allow one to use 'enum
> Status' and not 'Status'. Yet the PSDK headers seem to make use of
> 'Status'. This might be different in C++ though...
> So on the whole it's probably ok to use a typedef. I just prefer to
> bring this up so others can chime in.

C++ auto-typedefs structs/classes, enums, and the like.
enum Status { };
in C++ would be equivilant to:
typedef enum Status { } Status;
in C. And yes, both the enum and typedef can have the same name.. the compiler 
is smart enough to tell the difference between 'enum Status' and 'Status' 
being used as types. Both can be used interchangeabley, too.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic