On Sat, Jul 9, 2011 at 11:29 AM, Mark Wiebe <[email protected]> wrote: > typedef npy_uint8 npy_mask; > #define NPY_MASK NPY_UINT8 > #define NPY_MASK_ISEXPOSED(mask) (((mask)&0x01) != 0) > #define NPY_MASK_GETPAYLOAD(mask) (((npy_mask)mask) >> 1) > #define NPY_MASK_MAKEMASK(exposed, payload) ((npy_mask)(exposed&0x01) | > (npy_mask)(payload << 1))
Even better, these should be inline functions instead of macros... (or is there some horrible old compiler that we care about that that wouldn't work for?) -- Nathaniel _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
