On Fri, Mar 6, 2009 at 2:01 PM, Charles R Harris <charlesr.har...@gmail.com>wrote:
> Hi David, > > Currently, > > bint.i = __STR2INTCST("ABCD"); > > It is probably more portable to just initialize the union > > union { > char c[4]; > npy_uint32 i; > } bint = {'A','B','C','D'}; > > > If you use const union the initialization will be done at compile time. > Better yet const union { npy_uint32 i; char c[4]; } bint = {0x01020304}; And check for the numbers 1,2,3,4. Chuck
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion