Re: C mapping of enums...



> On Tue, 6 Feb 2001, Mark McLoughlin wrote:
>
> > Hi all,
> >       ORBit doesn't generate the correct code for enums.
> >
> >       I know it wasn't an oversight because of the comment in
> > orbit-idl-c-headers.c - but a spec is a spec, and there doesn't
> > seem to be a valid reason for not going by the spec ?
>
> It is the same from the application's point of view, and it's cleaner
> (it's actually an enum), and it's easier to debug (e.g. gdb knows how to
> print the symbolic enum values out).

I assume the reason it was specified this way was that there is no
guarantee to the storage size of an enum in C. By typedefing your
enum as a CORBA_long you get the 32 bit unsigned integer required by
the specification.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]