On 01/28/2014 12:27 AM, "Martin v. Löwis" wrote:
I'd like to resolve a long-standing issue of the stable ABI in 3.4:

http://bugs.python.org/issue17162

The issue is that, since PyTypeObject is opaque, module authors cannot
get at tp_free, which they may need to in order to implement tp_dealloc
properly.

Rather than providing the proposed specific wrapper for tp_dealloc, I
propose to add a generic PyType_GetSlot function. From a stability point
of view, exposing slot values is uncritical - it's just that the layout
of the type object is hidden.

Any objection to adding this before RC1?

So this would be a new public ABI function?

Would it be 100% new code, or would you need to refactor code internally to achieve it?

In general I'm in favor of it but I'd like to review the patch before it goes in.

Also, just curious: what is typeslots.h used for?  I tried searching for a couple of those macros, and their only appearance in trunk was their definition.


Cheers,


/arry