[Rpm-maint] [PATCH 02/15] Generalize access to ob_type so that they work with both Python 2.* and Python 3.*
Panu Matilainen
pmatilai at redhat.com
Mon Oct 19 07:58:43 UTC 2009
On Thu, 15 Oct 2009, David Malcolm wrote:
> Python 2's various object structs use macros to implement common fields
> at the top of each struct.
>
> Python 3's objects instead embed a PyObject struct as the first member
> within the more refined object structs.
>
> Use the Py_TYPE() macro when accessing ob_type in order to encapsulate
> this difference.
This already breaks anything older than Python 2.6, but of course easily
fixed by providing a compatibility macro. Applied.
- Panu -
More information about the Rpm-maint
mailing list