[Python-3000] Draft PEP: Dropping PyObject_HEAD

"Martin v. Löwis" martin at v.loewis.de
Sun Apr 29 12:05:13 CEST 2007


Greg Ewing schrieb:
> Martin v. Löwis wrote:
>> I expect access to ob_type is frequent in Foo_Check() macros;
>> those need to be rewritten to use Py_Type(op).
> 
> Maybe some of this breakage could be repaired by renaming
> the real ob_type field and doing something like
> 
>    #define ob_type ob_base._ob_type

That doesn't work. For variable-sized objects, it would need
to be ob_base.ob_base.ob_type.

Regards,
Martin


More information about the Python-3000 mailing list