Extensions on Windows, questions for experts.

Martin von Loewis loewis at informatik.hu-berlin.de
Wed Jan 16 03:36:45 EST 2002


Michel Van den Bergh <vdbergh at luc.ac.be> writes:

> I realize there is an issue with data structures, but I don't quite
> understand it. Is there some place I can learn about data structures
> embedded in dll's?

The issue here is that the layout of structures may change between
Python releases. E.g. the dictobject layout changed quite often
recently. Likewise, presence or absence of GC changes the layout of
objects.

Before 2.0, the most serious problem were additions to the type
object; Python might have accessed members of a type object which
weren't really there at the time the type object was compiled. These
days, Python always analyses the flags of the type object to see what
members it can rely on.

I recommend you perform a diff between the Include directories of two
Python releases, to analyse in detail what structures have changed in
what ways. In general, PYTHON_API_VERSION is supposed to change every
time a module-visible change happens.

Regards,
Martin



More information about the Python-list mailing list