[Python-Dev] PEP 384: Defining a Stable ABI

M.-A. Lemburg mal at egenix.com
Wed May 27 14:05:06 CEST 2009


Nick Coghlan wrote:
> [PEP]
>>>>>> Function-like macros (in particular, field access macros) remain
>>>>>> available to applications, but get replaced by function calls
>>>>>> (unless their definition only refers to features of the ABI, such
>>>>>> as the various _Check macros)
> [MAL]
>>>>> Including Py_INCREF()/Py_DECREF() ?
> [Nick]
>>>> I believe so - MvL deliberately left the fields that the ref counting
>>>> relies on as part of the ABI.
> [MAL]
>>> Hmm, another slow-down.
> [MvL]
>> ??? Why is "no change" a slow-down?
> 
> That was just a miscommunication - I misunderstood the sense in which
> MAL was using "Including". He was referring to the first part of the
> paragraph from the PEP (most macros become functions), but I answered
> assuming he was referring to the part in parentheses (some macros get to
> stay).
> 
> So to be perfectly clear: the Py_INCREF/Py_DECREF macros are available
> as part of the stable ABI because they qualify for the PEP's "definition
> only refers to features of the ABI" exception.

Sorry for the confusion.

The exclusion clause in the PEP should probably be replaced by
an explicit list of macros which are made available.

It not necessarily obvious that a macro only uses features
made available through the ABI without actually digging through
the headers. In the case of Py_INCREF()/Py_DECREF() the
macros do use private macros which the ABI omits.

Cheers,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 27 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2009-06-29: EuroPython 2009, Birmingham, UK                32 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/



More information about the Python-Dev mailing list