diff options
author | Victor Stinner <vstinner@python.org> | 2020-02-05 12:12:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 12:12:19 (GMT) |
commit | f58bd7c1693fe041f7296a5778d0a11287895648 (patch) | |
tree | 066423d4c91278ace5f1f9159436fc2917ed2af8 /Misc | |
parent | 0fa4f43db086ac3459811cca4ec5201ffbee694a (diff) | |
download | cpython-f58bd7c1693fe041f7296a5778d0a11287895648.zip cpython-f58bd7c1693fe041f7296a5778d0a11287895648.tar.gz cpython-f58bd7c1693fe041f7296a5778d0a11287895648.tar.bz2 |
bpo-39542: Make PyObject_INIT() opaque in limited C API (GH-18363)
In the limited C API, PyObject_INIT() and PyObject_INIT_VAR() are now
defined as aliases to PyObject_Init() and PyObject_InitVar() to make
their implementation opaque. It avoids to leak implementation details
in the limited C API.
Exclude the following functions from the limited C API, move them
from object.h to cpython/object.h:
* _Py_NewReference()
* _Py_ForgetReference()
* _PyTraceMalloc_NewReference()
* _Py_GetRefTotal()
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/C API/2020-02-05-12-40-51.bpo-39542.si-_Zq.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2020-02-05-12-40-51.bpo-39542.si-_Zq.rst b/Misc/NEWS.d/next/C API/2020-02-05-12-40-51.bpo-39542.si-_Zq.rst new file mode 100644 index 0000000..7473577 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-02-05-12-40-51.bpo-39542.si-_Zq.rst @@ -0,0 +1,7 @@ +In the limited C API, ``PyObject_INIT()`` and ``PyObject_INIT_VAR()`` are +now defined as aliases to :c:func:`PyObject_Init` and +:c:func:`PyObject_InitVar` to make their implementation opaque. It avoids to +leak implementation details in the limited C API. Exclude the following +functions from the limited C API: ``_Py_NewReference()``, +``_Py_ForgetReference()``, ``_PyTraceMalloc_NewReference()`` and +``_Py_GetRefTotal()``. |