Pyrex, enumeration constants, and wrapping #define's

Edward C. Jones edcjones at erols.com
Sun Apr 6 09:55:38 EDT 2003


Harbison and Steele ( 4th edition, Section 5.5) say that some C 
compilers will accept an enum where some constant expression is written 
in terms of a previously defined enumeration constant:

     enum xx {
         a = 2,
         b = a + 3
     }

Does Pyrex accept the following?

     enum
         a = 2
         b = a + 3

If not, how should I wrap this?

     #define IPL_DEPTH_SIGN 0x80000000
     #define IPL_DEPTH_8S  (IPL_DEPTH_SIGN| 8)





More information about the Python-list mailing list