mirror of
https://github.com/python/cpython.git
synced 2025-10-28 01:00:34 +00:00
bpo-39573: Add Py_SET_REFCNT() function (GH-18389)
Add a Py_SET_REFCNT() function to set the reference counter of an object.
This commit is contained in:
parent
a93c51e3a8
commit
c86a11221d
7 changed files with 30 additions and 14 deletions
|
|
@ -79,6 +79,13 @@ the definition of all other Python objects.
|
|||
(((PyObject*)(o))->ob_refcnt)
|
||||
|
||||
|
||||
.. c:function:: void Py_SET_REFCNT(PyObject *o, Py_ssize_t refcnt)
|
||||
|
||||
Set the object *o* reference counter to *refcnt*.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
|
||||
|
||||
.. c:macro:: Py_SIZE(o)
|
||||
|
||||
This macro is used to access the :attr:`ob_size` member of a Python object.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue