Ronald Oussoren <ronaldousso...@mac.com> added the comment:

The incompatibility mentioned in msg366473 is probably fixable by treating the 
PyObject header the same as the GC head structure. With some care this could 
mostly maintain binary compatibility by inserting some unused fields in 
PyObject_HEAD instead of the PyObject header when an extension targets a stable 
ABI version that has the PyObject header in-line.

This issue seems to be comparible to the "fragile instance variable" issue 
fixed in Objective-C 2.0, see 
<https://en.wikipedia.org/wiki/Objective-C#Non-fragile_instance_variables>.  
That was fixed by adding a level of indirection when accessing member variables.

Something like that is probably necessary to be able to subclass builtin types 
(other than object itself) in an extension.

----------
nosy: +ronaldoussoren

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39573>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to