On Sun, Apr 7, 2013 at 2:26 PM, Valentin Haenel <[email protected]> wrote: > I know that the address is contained in the 'data' field of the > '__array_interface__' and is either an int or a long. My guess is that > this depends on the architecture of the system, i.e. 32 vs 64 bit > systems. > > My question is: what is the correct type to use when using > PyArg_ParseTuple to convert the value. I am currently using: > > k (integer) [unsigned long] > > Convert a Python integer or long integer to a C unsigned long > without overflow checking. > > The reason I chose 'k' is because it seems to be the only option that > can deal with both Python int and long types. And was wondering if this > is the correct choice. Also note that whatever it is, it will be cast to > a 'void *' later.
This won't work on Win64, where C 'long' is 32 bits, but void* is 64 bits. -n _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
