[Python-ideas] improving C structs layout

Antoine Pitrou solipsis at pitrou.net
Fri May 10 10:20:16 CEST 2013


Le Fri, 10 May 2013 08:58:47 +0100,
Paul Moore <p.f.moore at gmail.com> a écrit :
> On 10 May 2013 08:39, Chris Angelico
> <rosuav at gmail.com> wrote:
> 
> > > Certainly. It should not be done for public structs, which
> > > includes basically everything that resides in header files.
> > > Modifying public
> > structs
> > > changes the ABI, so a module compiled for one CPython version
> > > would need
> > to
> > > be recompiled for the one that changes the structs *if* it uses
> > > them. I don't think this change is worth that risk and hassle.
> >
> > Would that be a problem if the change is done only in 3.4, though?
> 
> 
> It would affect the stable ABI. Structs in the stable ABI can't be
> changed until Python 4, AIUI.

You are right. We can only change the layout of those structs which are
not in the stable ABI.
(fortunately, I think Martin has generally been wise enough to exclude
implementation details from the ABI :-))

Regards

Antoine.





More information about the Python-ideas mailing list