Making a C extension compatible with 2.2

Richard Townsend richard at NOstarfighterSPAM.freeuk.com
Wed Apr 17 13:50:54 EDT 2002


"Hamish Lawson" <hamish_lawson at yahoo.co.uk> wrote in message
news:915a998f.0204170914.66aee851 at posting.google.com...
> 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. 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?
>

I found a very similar problem with the ingmod package (Python interface to
Ingres DB) on HP-UX 11.

It works fine with Python 2.1 but in 2.2 it breaks the list class's ability
to be used in a for loop (giving the strange error message 'IndexError:
tuple index out of range').

I've not been able to identify where it's failing though :-(











More information about the Python-list mailing list