[New-bugs-announce] [issue35206] Add new experimental _Py_CAPI2 API

STINNER Victor report at bugs.python.org
Fri Nov 9 20:37:33 EST 2018


New submission from STINNER Victor <vstinner at redhat.com>:

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 call and
the implementation uses assertions to check if the first argument is
a tuple and that the index is valid. It should help to investigate
bugs when Python is compiled in debug mode.

This issue implements the idea that I proposed on python-dev:
https://mail.python.org/pipermail/python-dev/2018-November/155702.html

----------
components: Interpreter Core
messages: 329583
nosy: vstinner
priority: normal
severity: normal
status: open
title: Add new experimental _Py_CAPI2 API
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35206>
_______________________________________


More information about the New-bugs-announce mailing list