[Numpy-discussion] Changeset 6557

Charles R Harris charlesr.harris at gmail.com
Fri Mar 6 16:01:07 EST 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.python.org/pipermail/numpy-discussion/attachments/20090306/18d36612/attachment.html>


More information about the NumPy-Discussion mailing list