[Pyrex] Pyrex idioms and optimizations?

Stefan Behnel stefan_ml at behnel.de
Wed Jul 25 08:28:11 CEST 2007


Greg Ewing wrote:
> Stefan Behnel wrote:
>> I just grep-ed for "Py_ssize_t" in the official 0.9.5.1a sources and didn't
>> find anything. There were a lot of API changes that require the Py_ssize_t
>> type, so I can't imagine it works without having Py_ssize_t in the generator
>> somewhere.
> 
> It's possible that Pyrex doesn't happen to generate any code
> that needs a Py_ssize_t, but I don't really know. If anyone
> finds anywhere that it should be used, please let me know.

Well, look at my patch from April last year:

http://comments.gmane.org/gmane.comp.python.pyrex/1767

A major part of the Python API has changed and now uses a Py_ssize_t where it
was int before. Especially type slots have changed, basically everything that
deals with indexes (len, setitem, ...). There is no way the latest Pyrex
release can produce code that runs on a 64-bit system with Python 2.5.

Stefan




More information about the Pyrex mailing list