
April 5, 2011
4:01 p.m.
On Tue, Apr 5, 2011 at 8:44 AM, Alan G Isaac <alan.isaac@gmail.com> wrote:
On 4/5/2011 10:37 AM, Nathaniel Smith wrote:
Yes, this is a fact about Python 'int', not a fact about numpy -- a Python 'int' is defined to hold a C 'long', which will be either 32 or 64 bits depending on platform.
So what is the rule for Python 3, where iiuc it can no longer be "a fact about Python"?
At the c-api level I believe we still use the routines that convert python ints to longs. If we drop support for python < 2.6 we could change to using Py_ssize_t instead since there are python functions for that and we might get larger ints on 64 bit windows since windows longs are always 32 bits. That might also be compiler dependent however... Chuck