[Numpy-discussion] Changeset 6557

Charles R Harris charlesr.harris@gmail....
Sat Mar 7 11:52:06 CST 2009


On Sat, Mar 7, 2009 at 11:41 AM, David Cournapeau <cournape@gmail.com>wrote:

> On Sat, Mar 7, 2009 at 6:01 AM, Charles R Harris
> <charlesr.harris@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'};
> >
>

Yes, but look at the second version. It does essentially what your macro
does, only uses 1,2,3,4 instead of 'A','B','C','D'. I'm tempted to just make
the change but it's your baby...

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


More information about the Numpy-discussion mailing list