[Numpy-discussion] Changeset 6557

Charles R Harris charlesr.harris@gmail....
Fri Mar 6 15:01:07 CST 2009


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.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090306/18d36612/attachment.html 


More information about the Numpy-discussion mailing list