Making a C extension compatible with 2.2

Just van Rossum just at xs4all.nl
Wed Apr 17 13:23:43 EDT 2002


In article <915a998f.0204170914.66aee851 at posting.google.com>,
 hamish_lawson at yahoo.co.uk (Hamish Lawson) wrote:

> Must anything be done to make a C extension compatible with Python
> 2.2? I have an extension (not my own) that ran fine under Python 2.1
> on Solaris 2.6. I have since recompiled it for Python 2.2, but
> sometimes I now get tuple indexing errors - and not necessarily at a
> point in my Python code where the loaded extension is actually being
> called upon.

Does this exception make sense at all in that place? If not, that's a 
fairly sure sign the extension is setting an error somewhere yet doesn't 
return NULL. The exception will the pop up a little bit later at a 
seemingly random place.

> Running the same code under Python 2.1 is OK. Would I be
> right in thinking it may be related to the changes in Python 2.2 for
> the new iterator protocol?

Without seeing more details that seems an awfully long shot...

Just



More information about the Python-list mailing list