[issue35206] Add new experimental _Py_CAPI2 API

2018-11-09 Thread STINNER Victor
STINNER Victor added the comment: I previously tried a very similar patch but reusing Py_DEBUG define, rather than adding a new _Py_CAPI2 define: bpo-35199. I abandonned it because it was backward incompatible. This change is backward compatible: the new API is not compatible with the curren

[issue35206] Add new experimental _Py_CAPI2 API

2018-11-09 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +9717 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue35206] Add new experimental _Py_CAPI2 API

2018-11-09 Thread STINNER Victor
New submission from STINNER Victor : Add a new experimental "_Py_CAPI2" API: opt-in which doesn't leak implementation details and replace macros with function calls. Attached PR modified PyTuple_GET_ITEM() if _Py_CAPI2 is defined. With this API, PyTuple_GET_ITEM() macro becomes a function cal